MediaWiki:Gadget-FloatTOC.css

勤求古训,博采众方
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/**
 * SPDX-License-Identifier: GPL-3.0-or-later
 * _addText: '{{Gadget Header|license=GPL-3.0-or-later}}'
 *
 * @source {@link https://git.qiuwen.net.cn/InterfaceAdmin/QiuwenGadgets/src/branch/master/src/FloatTOC}
 * @author 安忆 <i@anyi.in>
 * @license GPL-3.0-or-later {@link https://www.qiuwenbaike.cn/wiki/H:GPL-3.0}
 */

/**
 * Copyright (C)  安忆
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
/**
 * +------------------------------------------------------------+
 * |            === WARNING: GLOBAL GADGET FILE ===             |
 * +------------------------------------------------------------+
 * |       All changes should be made in the repository,        |
 * |                otherwise they will be lost.                |
 * +------------------------------------------------------------+
 * |        Changes to this page may affect many users.         |
 * | Please discuss changes by opening an issue before editing. |
 * +------------------------------------------------------------+
 */
/* <nowiki> */

/* src/FloatTOC/FloatTOC.less */
#floatTOC {
  padding: 0.5rem;
  cursor: auto;
}
#floatTOC .toc {
  max-height: 80vh;
  padding-top: 0;
  margin: 0 auto;
}
.skin-vector-legacy #floatTOC .toc {
  display: block;
  max-height: 90vh;
  padding-top: 1em;
  font-size: 1em;
  word-break: normal;
}
#floatTOC .toc > ul {
  overflow: auto;
  max-height: 70vh;
  border-bottom: 1px solid #e6e6e6;
}
#floatTOC ul {
  padding-right: 1rem;
}
#floatTOC #close {
  position: relative;
  top: 1em;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  float: right;
}
#floatTOC #close:hover {
  filter: drop-shadow(0 0 1px #000);
}
.skin-vector-legacy #floatTOC #close {
  top: 0;
}
.mw-mmv-lightbox-open #floatTOC,
.ve-activated #floatTOC {
  display: none !important;
}
#floatToc-opener {
  position: fixed;
  z-index: 13;
  top: 10.5vh;
  right: 2rem;
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  place-content: center center;
  align-items: center;
  padding: 0.5rem;
  border-radius: 25px;
  -webkit-backdrop-filter: saturate(50%) blur(16px);
  backdrop-filter: saturate(50%) blur(16px);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 0.5rem;
}
@media screen and (max-width: 720px), screen and (max-height: 800px) {
  .citizen-body-header--sticky #floatToc-opener {
    top: 21vh;
    right: 1rem;
  }
}
#floatToc-opener:active {
  box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.1);
}
#floatToc-opener:hover {
  box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.1);
}
#floatToc-opener span {
  display: block;
  margin: auto;
  opacity: 0.6;
  text-align: center;
}
#floatToc-opener span:first-child {
  position: relative;
  width: 2.5em;
  height: 2.5em;
}
#floatToc-opener span:last-child {
  color: #000;
}
.ve-activated #floatToc-opener {
  display: none !important;
}
.skin-citizen #toc .toctitle {
  display: flex;
  align-items: baseline;
  cursor: pointer;
}
.skin-citizen #toc .toctitle h2 {
  flex: 1;
}
.skin-citizen #toc .toctitle .oo-ui-indicatorElement-indicator {
  position: relative;
  margin-left: -1.125rem;
}
.skin-citizen #toc .toctitle .oo-ui-indicatorElement-indicator.collapse {
  transform: rotate(180deg);
}