MediaWiki:Common.css:修订间差异

来自神国反恶俗
跳到导航跳到搜索
无编辑摘要
无编辑摘要
第1行: 第1行:
/* 这里放置的CSS将应用于所有皮肤 */
/* 这里放置的CSS将应用于所有皮肤 */
/* ============================================================
/* ============================================================
   MediaWiki:Common.css  ——  神国维基全站样式
   MediaWiki:Common.css  ——  神国维基全站样式
  (整份文件,粘贴时把编辑框里的旧内容全选删掉再贴)
   ============================================================ */
   ============================================================ */
/* ------------------------------------------------------------
/* ------------------------------------------------------------
   ① 目录(TOC):去掉默认的浮动与边框,改成整块显示
   ① 目录(TOC):去掉默认的浮动与边框,改成整块显示
第20行: 第21行:
     font-size: 1em;
     font-size: 1em;
}
}
#p-toc .pBody {
#p-toc .pBody {
     max-height: 70vh;
     max-height: 70vh;
第26行: 第28行:
     line-height: 1.6;
     line-height: 1.6;
}
}
#p-toc ul {
#p-toc ul {
     margin: 0;
     margin: 0;
     padding-left: 1.6em;
     padding-left: 1.6em;
}
}
#p-toc .toctitle,
#p-toc .toctitle,
#p-toc .mw-table-of-contents__heading,
#p-toc .mw-table-of-contents__heading,
第35行: 第39行:
     display: none;
     display: none;
}
}
/* ------------------------------------------------------------
/* ------------------------------------------------------------
   ② 左侧导航栏:随屏幕滚动固定
   ② 左侧导航栏:随屏幕滚动固定
第47行: 第52行:
     max-height: 100vh;
     max-height: 100vh;
     overflow-y: auto;
     overflow-y: auto;
}
/* ------------------------------------------------------------
  ③ 顶部两排标签栏:固定在屏幕顶部,滚动时不动
  ------------------------------------------------------------ */
/* 第一排:参数设置 / 监视列表 / 贡献 / 退出 */
#p-personal {
    position: fixed !important;
    top: 0 !important;
    right: 12px !important;
    left: auto !important;
    margin: 0 !important;
    padding: 5px 12px !important;
    background: #ffffff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    z-index: 300;
}
/* 第二排:页面 / 讨论 / 编辑源代码 / 历史 / 删除 */
#p-cactions {
    position: fixed !important;
    top: 34px !important;
    right: 12px !important;
    left: auto !important;
    margin-left: 0 !important;
    padding: 4px 12px !important;
    background: #ffffff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    z-index: 299;
}
}
/* 正文往下让一点,别被上面两排固定栏盖住 */
#content {
    padding-top: 76px;
}
/* ------------------------------------------------------------
  ④ 窄屏(手机/小笔记本)时把固定栏放开,避免错位
  ------------------------------------------------------------ */
@media screen and (max-width: 900px) {
    #p-personal,
    #p-cactions {
        position: static !important;
        margin-left: 0 !important;
        box-shadow: none;
    }
    #content {
        padding-top: 0;
    }
}
}

2026年10月10日 (六) 13:43的版本

/* 这里放置的CSS将应用于所有皮肤 */

/* ============================================================
   MediaWiki:Common.css  ——  神国维基全站样式
   ============================================================ */

/* ------------------------------------------------------------
   ① 目录(TOC):去掉默认的浮动与边框,改成整块显示
   ------------------------------------------------------------ */
.mw-table-of-contents-container,
.mw-table-of-contents,
#toc,
.toc {
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: 1em;
}

#p-toc .pBody {
    max-height: 70vh;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.6;
}

#p-toc ul {
    margin: 0;
    padding-left: 1.6em;
}

#p-toc .toctitle,
#p-toc .mw-table-of-contents__heading,
#p-toc .mw-table-of-contents-header {
    display: none;
}

/* ------------------------------------------------------------
   ② 左侧导航栏:随屏幕滚动固定
   ------------------------------------------------------------ */
#column-one,
.mw-portlet,
.vector-menu-portal,
.sidebar-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
}