MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的3个中间版本) | |||
| 第2行: | 第2行: | ||
Citizen 皮肤定制 | Citizen 皮肤定制 | ||
最后稳定版本:2026-09-28 | 最后稳定版本:2026-09-28 | ||
结构: | |||
1. 字体 | |||
2. 全局页面布局 | |||
3. Header 隐藏(保留偏好设置) | |||
4. 偏好设置面板 | |||
5. 侧边工具栏 Rail | |||
6. Footer 页脚 | |||
7. 页面操作工具栏 | |||
8. 响应式断点(2 档) | |||
9. 评论区(页面级独立卡片,由 Common.js 从内容区搬出) | |||
修改须知: | |||
- 第 7、9 节规则互相依赖,调整前先复制一份 | |||
- 大量 !important 用于压过 Citizen 自带样式,不要盲删 | |||
- 测试场景:首页 / 普通页面 / 1147px / 600px / 夜间模式 | |||
============================================ */ | ============================================ */ | ||
| 第46行: | 第62行: | ||
} | } | ||
/* 2.2 页面容器:与四周留空隙 */ | /* 2.2 页面容器:与四周留空隙 | ||
三个页级块(.mw-body / .comments-body--page-level / .citizen-footer) | |||
都在此容器内,宽度自然对齐 | |||
*/ | |||
.citizen-page-container { | .citizen-page-container { | ||
padding: 1.5rem 1.5rem 0 1.5rem; | padding: 1.5rem 1.5rem 0 1.5rem; | ||
| 第55行: | 第74行: | ||
} | } | ||
/* 2.3 | /* 2.3 主内容卡片 | ||
- position: relative 供第 7 节工具栏做定位参考 | |||
*/ | |||
.mw-body { | .mw-body { | ||
position: relative; | position: relative; | ||
| 第65行: | 第86行: | ||
margin: 0 auto; | margin: 0 auto; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
flex: | flex: 0 0 auto; | ||
background: rgba(255, 255, 255, 0.97); | background: rgba(255, 255, 255, 0.97); | ||
} | } | ||
| 第79行: | 第100行: | ||
} | } | ||
/* 2.4 | /* 2.4 三种宽度偏好(作用于主内容卡片) */ | ||
html.citizen-feature-custom-width-clientpref-narrow .mw-body { | html.citizen-feature-custom-width-clientpref-narrow .mw-body { | ||
max-width: 55rem !important; | max-width: 55rem !important; | ||
| 第131行: | 第152行: | ||
============================================ */ | ============================================ */ | ||
#citizen-preferences-dropdown__card { | #citizen-preferences-dropdown__card { | ||
position: fixed !important; | position: fixed !important; | ||
| 第177行: | 第197行: | ||
============================================ */ | ============================================ */ | ||
.rail-container { | .rail-container { | ||
position: fixed; | position: fixed; | ||
| 第193行: | 第212行: | ||
} | } | ||
.rail-button { | .rail-button { | ||
width: 2.5rem; | width: 2.5rem; | ||
| 第223行: | 第241行: | ||
} | } | ||
.rail-panel { | .rail-panel { | ||
position: fixed; | position: fixed; | ||
| 第243行: | 第260行: | ||
} | } | ||
.rail-panel__header { | .rail-panel__header { | ||
display: flex; | display: flex; | ||
| 第271行: | 第287行: | ||
} | } | ||
.rail-panel__content { | .rail-panel__content { | ||
padding: 1.25rem; | padding: 1.25rem; | ||
| 第283行: | 第298行: | ||
} | } | ||
.rail-panel__content .mw-parser-output h3 { | .rail-panel__content .mw-parser-output h3 { | ||
font-size: 1rem; | font-size: 1rem; | ||
| 第315行: | 第329行: | ||
} | } | ||
.rail-overlay { | .rail-overlay { | ||
position: fixed; | position: fixed; | ||
| 第335行: | 第348行: | ||
/* ============================================ | /* ============================================ | ||
6. | 6. 全局页脚(暗红渐变,铺满视口宽度) | ||
============================================ */ | ============================================ */ | ||
| 第419行: | 第432行: | ||
============================================ */ | ============================================ */ | ||
.citizen-page-header { | .citizen-page-header { | ||
position: static !important; | position: static !important; | ||
| 第427行: | 第439行: | ||
} | } | ||
.citizen-page-actions { | .citizen-page-actions { | ||
position: absolute !important; | position: absolute !important; | ||
| 第441行: | 第452行: | ||
} | } | ||
.citizen-page-actions .citizen-menu__heading { | .citizen-page-actions .citizen-menu__heading { | ||
display: none !important; | display: none !important; | ||
} | } | ||
.citizen-page-actions .citizen-menu, | .citizen-page-actions .citizen-menu, | ||
.citizen-page-actions .citizen-menu__content, | .citizen-page-actions .citizen-menu__content, | ||
| 第459行: | 第468行: | ||
} | } | ||
.citizen-page-actions .mw-list-item, | .citizen-page-actions .mw-list-item, | ||
.citizen-page-actions .citizen-share-trigger, | .citizen-page-actions .citizen-share-trigger, | ||
| 第469行: | 第477行: | ||
} | } | ||
.citizen-page-actions .citizen-share-trigger { order: 0 !important; } | .citizen-page-actions .citizen-share-trigger { order: 0 !important; } | ||
.citizen-page-actions #ca-view { order: 1 !important; } | .citizen-page-actions #ca-view { order: 1 !important; } | ||
| 第479行: | 第486行: | ||
.citizen-page-actions #citizen-page-more-dropdown { order: 7 !important; } | .citizen-page-actions #citizen-page-more-dropdown { order: 7 !important; } | ||
.citizen-page-actions .mw-list-item > a, | .citizen-page-actions .mw-list-item > a, | ||
.citizen-page-actions .citizen-share, | .citizen-page-actions .citizen-share, | ||
| 第509行: | 第515行: | ||
} | } | ||
.citizen-page-actions .mw-list-item > a:hover, | .citizen-page-actions .mw-list-item > a:hover, | ||
.citizen-page-actions .citizen-share:hover, | .citizen-page-actions .citizen-share:hover, | ||
| 第517行: | 第522行: | ||
} | } | ||
.citizen-page-actions .mw-list-item > a > span:not(.citizen-ui-icon), | .citizen-page-actions .mw-list-item > a > span:not(.citizen-ui-icon), | ||
.citizen-page-actions .citizen-share > span:not(.citizen-ui-icon), | .citizen-page-actions .citizen-share > span:not(.citizen-ui-icon), | ||
| 第526行: | 第530行: | ||
} | } | ||
.citizen-page-actions .citizen-share-trigger, | .citizen-page-actions .citizen-share-trigger, | ||
.citizen-page-actions .citizen-dropdown-details { | .citizen-page-actions .citizen-dropdown-details { | ||
| 第545行: | 第548行: | ||
} | } | ||
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a { | .citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a { | ||
all: unset !important; | all: unset !important; | ||
| 第571行: | 第573行: | ||
} | } | ||
.citizen-body-container { | .citizen-body-container { | ||
padding-right: 5rem !important; | padding-right: 5rem !important; | ||
} | } | ||
html.skin-theme-clientpref-night .citizen-page-actions .mw-list-item > a, | html.skin-theme-clientpref-night .citizen-page-actions .mw-list-item > a, | ||
html.skin-theme-clientpref-night .citizen-page-actions .citizen-share, | html.skin-theme-clientpref-night .citizen-page-actions .citizen-share, | ||
| 第597行: | 第597行: | ||
/* ============================================ | /* ============================================ | ||
8. 响应式断点(2 档) | 8. 响应式断点(2 档) | ||
- | - ≥1101px:完整桌面 | ||
- | - ≤1100px:移动端横排 | ||
- | - ≤700px:窄移动端 | ||
============================================ */ | ============================================ */ | ||
| 第605行: | 第605行: | ||
@media (max-width: 1100px) { | @media (max-width: 1100px) { | ||
.citizen-page-aside { | .citizen-page-aside { | ||
display: none !important; | display: none !important; | ||
| 第614行: | 第613行: | ||
} | } | ||
.citizen-page-actions { | .citizen-page-actions { | ||
position: static !important; | position: static !important; | ||
| 第639行: | 第637行: | ||
} | } | ||
.citizen-page-actions #citizen-page-actions-more__card { | .citizen-page-actions #citizen-page-actions-more__card { | ||
position: fixed !important; | position: fixed !important; | ||
| 第669行: | 第666行: | ||
@media (max-width: 700px) { | @media (max-width: 700px) { | ||
.citizen-page-container { | .citizen-page-container { | ||
padding: 0.75rem 0.75rem 0 0.75rem; | padding: 0.75rem 0.75rem 0 0.75rem; | ||
| 第678行: | 第674行: | ||
} | } | ||
#citizen-preferences-dropdown__card { | #citizen-preferences-dropdown__card { | ||
top: 0 !important; | top: 0 !important; | ||
| 第696行: | 第691行: | ||
} | } | ||
.rail-panel { | .rail-panel { | ||
width: 80vw; | width: 80vw; | ||
| 第707行: | 第701行: | ||
} | } | ||
.citizen-footer { | .citizen-footer { | ||
margin: 1rem -0.75rem 0 -0.75rem; | margin: 1rem -0.75rem 0 -0.75rem; | ||
| 第714行: | 第707行: | ||
} | } | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
9. | 9. 评论区:页面级独立卡片 | ||
由 Common.js 从 .mw-parser-output 中移出, | |||
挂到 .mw-body 之后,成为 .citizen-page-container 的直接子元素。 | |||
与主内容卡片、全局页脚并列,形成三个独立区块。 | |||
依赖 JS 加上的 .comments-body--page-level 类 | |||
============================================ */ | ============================================ */ | ||
/* 9.1 | |||
.comments-body { | /* 9.1 独立卡片主体:与 .mw-body 视觉一致 */ | ||
margin | .comments-body.comments-body--page-level { | ||
margin: 2rem auto 0 auto !important; | |||
padding: 2rem 2.5rem !important; | |||
background: rgba(255, 255, 255, 0.97) !important; | |||
border-radius: 1rem !important; | |||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important; | |||
box-sizing: border-box !important; | |||
width: 100% !important; | |||
max-width: 100% !important; | |||
} | } | ||
/* 9.2 | /* 9.2 三种宽度偏好同步(与 2.4 保持一致) */ | ||
html.citizen-feature-custom-width-clientpref-narrow .comments-body.comments-body--page-level { | |||
max-width: 55rem !important; | |||
} | |||
html.citizen-feature-custom-width-clientpref-standard .comments-body.comments-body--page-level { | |||
max-width: 80rem !important; | |||
} | |||
html.citizen-feature-custom-width-clientpref-wide .comments-body.comments-body--page-level { | |||
max-width: 110rem !important; | |||
} | |||
html.citizen-feature-custom-width-clientpref-full .comments-body.comments-body--page-level { | |||
max-width: 100% !important; | |||
} | |||
/* 9.3 夜间模式 */ | |||
html.skin-theme-clientpref-night .comments-body.comments-body--page-level { | |||
background: rgba(30, 22, 24, 0.95) !important; | |||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important; | |||
} | |||
html.skin-theme-clientpref-pureblack .comments-body.comments-body--page-level { | |||
background: rgba(0, 0, 0, 0.95) !important; | |||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important; | |||
} | |||
/* 9.4 隐藏"检索自 URL"的 printfooter */ | |||
.mw-body-content > .printfooter { | |||
display: none !important; | |||
} | |||
/* 9.5 单条评论:分隔线 */ | |||
.comments-body .c-comment { | .comments-body .c-comment { | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
padding: 0. | padding: 0.75rem 0; | ||
border-bottom: 1px solid rgba(86, 0, 13, 0.08); | |||
} | |||
.comments-body .c-comment:last-child { | |||
border-bottom: none; | |||
} | } | ||
/* 9. | /* 9.6 评论表单 textarea:覆盖内联 style="height: 15px;" */ | ||
.comments-body | .comments-body textarea, | ||
.comments-body | .comments-body #comment { | ||
min-height: | width: 100% !important; | ||
font-size: 0.95rem; | max-width: 100% !important; | ||
padding: 0.5rem; | height: auto !important; | ||
min-height: 5rem !important; | |||
font-size: 0.95rem !important; | |||
padding: 0.5rem 0.75rem !important; | |||
border: 1px solid rgba(86, 0, 13, 0.2) !important; | |||
border-radius: 0.4rem !important; | |||
background: #fff !important; | |||
box-sizing: border-box !important; | |||
resize: vertical !important; | |||
font-family: inherit !important; | |||
line-height: 1.6 !important; | |||
display: block !important; | |||
} | } | ||
/* 9. | /* 9.7 回复链接 */ | ||
.comments-body .comments-reply-to { | .comments-body .comments-reply-to { | ||
font-size: 0.85rem; | font-size: 0.85rem; | ||
color: #56000d; | color: #56000d; | ||
text-decoration: none; | text-decoration: none; | ||
padding: 0.2rem 0.5rem; | |||
border-radius: 0.25rem; | |||
} | } | ||
.comments-body .comments-reply-to:hover { | .comments-body .comments-reply-to:hover { | ||
background: rgba(86, 0, 13, 0.08); | |||
} | |||
/* 9.8 "发表评论"/"显示预览"按钮 */ | |||
.comments-body .site-button { | |||
background: #56000d; | |||
color: #fff; | |||
border: none; | |||
padding: 0.5rem 1.2rem; | |||
border-radius: 0.4rem; | |||
font-size: 0.9rem; | |||
cursor: pointer; | |||
margin-right: 0.5rem; | |||
margin-top: 0.75rem; | |||
font-family: inherit; | |||
transition: background 0.2s; | |||
} | |||
.comments-body .site-button:hover { | |||
background: #8b1a2b; | |||
} | } | ||
/* 9. | /* 9.9 编辑/取消表单按钮 */ | ||
.comments-body .c-comment-edit-form-save, | .comments-body .c-comment-edit-form-save, | ||
.comments-body .c-comment-edit-form-cancel { | .comments-body .c-comment-edit-form-cancel { | ||
font-size: 0.85rem; | font-size: 0.85rem; | ||
padding: 0. | padding: 0.35rem 0.9rem; | ||
margin-right: 0.5rem; | margin-right: 0.5rem; | ||
border-radius: 0.4rem; | |||
border: none; | |||
cursor: pointer; | |||
font-family: inherit; | |||
} | |||
.comments-body .c-comment-edit-form-save { | |||
background: #56000d; | |||
color: #fff; | |||
} | |||
.comments-body .c-comment-edit-form-save:hover { | |||
background: #8b1a2b; | |||
} | |||
.comments-body .c-comment-edit-form-cancel { | |||
background: transparent; | |||
color: #56000d; | |||
border: 1px solid rgba(86, 0, 13, 0.2); | |||
} | |||
/* 9.10 排序选择、自动刷新控件 */ | |||
.comments-body .c-order { | |||
font-size: 0.85rem; | |||
color: #666; | |||
margin-bottom: 0.5rem; | |||
} | |||
.comments-body .c-order select { | |||
padding: 0.25rem 0.5rem; | |||
border: 1px solid rgba(86, 0, 13, 0.2); | |||
border-radius: 0.3rem; | |||
font-family: inherit; | |||
font-size: 0.85rem; | |||
} | |||
.comments-body .c-spy a { | |||
color: #56000d; | |||
text-decoration: none; | |||
font-size: 0.85rem; | |||
} | |||
.comments-body .c-spy a:hover { | |||
text-decoration: underline; | |||
} | |||
/* 9.11 "添加您的评论"标题 */ | |||
.comments-body .c-form-title { | |||
font-size: 1rem; | |||
font-weight: bold; | |||
color: #56000d; | |||
margin-bottom: 0.75rem; | |||
} | } | ||
/* 9. | /* 9.12 评论区内部夜间模式细节 */ | ||
html.skin-theme-clientpref-night .comments-body { | html.skin-theme-clientpref-night .comments-body .c-comment { | ||
border- | border-bottom-color: rgba(212, 165, 176, 0.12); | ||
} | |||
html.skin-theme-clientpref-night .comments-body textarea, | |||
html.skin-theme-clientpref-night .comments-body #comment { | |||
background: rgba(30, 22, 24, 0.6) !important; | |||
border-color: rgba(212, 165, 176, 0.25) !important; | |||
color: #ddd !important; | |||
} | } | ||
html.skin-theme-clientpref-night .comments-body .comments-reply-to { | html.skin-theme-clientpref-night .comments-body .comments-reply-to { | ||
color: #d4a5b0; | color: #d4a5b0; | ||
} | |||
html.skin-theme-clientpref-night .comments-body .comments-reply-to:hover { | |||
background: rgba(212, 165, 176, 0.1); | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-form-title { | |||
color: #d4a5b0; | |||
} | |||
/* 9.13 移动端:评论区内边距收紧 */ | |||
@media (max-width: 700px) { | |||
.comments-body.comments-body--page-level { | |||
padding: 1.25rem 1rem !important; | |||
border-radius: 0.75rem !important; | |||
} | |||
} | } | ||
2026年9月28日 (一) 21:59的最新版本
/* ============================================
Citizen 皮肤定制
最后稳定版本:2026-09-28
结构:
1. 字体
2. 全局页面布局
3. Header 隐藏(保留偏好设置)
4. 偏好设置面板
5. 侧边工具栏 Rail
6. Footer 页脚
7. 页面操作工具栏
8. 响应式断点(2 档)
9. 评论区(页面级独立卡片,由 Common.js 从内容区搬出)
修改须知:
- 第 7、9 节规则互相依赖,调整前先复制一份
- 大量 !important 用于压过 Citizen 自带样式,不要盲删
- 测试场景:首页 / 普通页面 / 1147px / 600px / 夜间模式
============================================ */
/* ============================================
1. 字体
============================================ */
@font-face {
font-family: 'LXGW WenKai Medium';
src: url('/fonts/LXGWWenKai-Medium.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-display: swap;
}
:root {
--font-family-base: 'LXGW WenKai Medium', system-ui, sans-serif;
}
html, body, .mw-body, .mw-parser-output {
font-family: 'LXGW WenKai Medium', system-ui, sans-serif;
}
/* ============================================
2. 全局页面布局
============================================ */
/* 2.1 固定背景 */
body {
/* 图片就绪后改成 background-image: url('/images/site-bg.jpg'); 并删掉渐变 */
background-image: linear-gradient(135deg, #1a0003 0%, #56000d 45%, #2a0006 100%);
background-attachment: fixed;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
min-height: 100vh;
}
html.skin-theme-clientpref-night body,
html.skin-theme-clientpref-pureblack body {
background-image: linear-gradient(135deg, #0a0000 0%, #2a0006 50%, #100002 100%);
}
/* 2.2 页面容器:与四周留空隙
三个页级块(.mw-body / .comments-body--page-level / .citizen-footer)
都在此容器内,宽度自然对齐
*/
.citizen-page-container {
padding: 1.5rem 1.5rem 0 1.5rem;
box-sizing: border-box;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 2.3 主内容卡片
- position: relative 供第 7 节工具栏做定位参考
*/
.mw-body {
position: relative;
border-radius: 1rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
padding: 2rem 2.5rem;
width: 100%;
max-width: 100%;
margin: 0 auto;
box-sizing: border-box;
flex: 0 0 auto;
background: rgba(255, 255, 255, 0.97);
}
html.skin-theme-clientpref-night .mw-body {
background: rgba(30, 22, 24, 0.95);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
html.skin-theme-clientpref-pureblack .mw-body {
background: rgba(0, 0, 0, 0.95);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}
/* 2.4 三种宽度偏好(作用于主内容卡片) */
html.citizen-feature-custom-width-clientpref-narrow .mw-body {
max-width: 55rem !important;
}
html.citizen-feature-custom-width-clientpref-standard .mw-body {
max-width: 80rem !important;
}
html.citizen-feature-custom-width-clientpref-wide .mw-body {
max-width: 110rem !important;
}
html.citizen-feature-custom-width-clientpref-full .mw-body {
max-width: 100% !important;
}
/* ============================================
3. Citizen Header 隐藏(保留偏好设置)
============================================ */
.citizen-header {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 0 !important;
height: 0 !important;
overflow: visible !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
z-index: 9999;
pointer-events: none;
}
.citizen-header__logo,
.citizen-search,
.citizen-drawer,
.citizen-header__start,
.citizen-userMenu,
.citizen-preferences-dropdown > details {
display: none !important;
}
.citizen-preferences-dropdown {
display: block !important;
pointer-events: auto;
}
/* ============================================
4. 偏好设置面板
============================================ */
#citizen-preferences-dropdown__card {
position: fixed !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
width: 32rem !important;
max-width: 92vw !important;
min-height: 20rem !important;
max-height: 80vh !important;
overflow-y: auto !important;
background: #fff !important;
border-radius: 0.75rem !important;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
padding: 1rem !important;
z-index: 100000 !important;
display: none;
}
#citizen-preferences-details[open] + #citizen-preferences-dropdown__card,
body.citizen-preferences-shown #citizen-preferences-dropdown__card {
display: block !important;
}
.citizen-preferences-close {
position: absolute;
top: 0.5rem;
right: 0.75rem;
background: transparent;
border: none;
font-size: 1.5rem;
line-height: 1;
color: #56000d;
cursor: pointer;
padding: 0.25rem 0.5rem;
z-index: 10;
}
.citizen-preferences-close:hover {
color: #8b1a2b;
}
/* ============================================
5. 侧边工具栏 Rail
============================================ */
.rail-container {
position: fixed;
top: 5rem;
right: 0;
z-index: 1000;
display: flex;
flex-direction: column;
gap: 0.25rem;
transition: transform 0.3s ease;
}
body.rail-open .rail-container {
transform: translateX(-19.5rem);
}
.rail-button {
width: 2.5rem;
height: 2.5rem;
border: none;
border-radius: 0.5rem 0 0 0.5rem;
background: #56000d;
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.15rem;
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
transition: background 0.2s, transform 0.2s;
padding: 0;
}
.rail-button:hover {
background: #8b1a2b;
transform: translateX(-2px);
}
.rail-button.is-active {
background: #8b1a2b;
transform: translateX(-4px);
}
.rail-button__icon {
line-height: 1;
pointer-events: none;
}
.rail-panel {
position: fixed;
top: 0;
right: 0;
width: 20rem;
height: 100vh;
background: #fff;
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
z-index: 1001;
transform: translateX(100%);
transition: transform 0.3s ease;
display: flex;
flex-direction: column;
overflow: hidden;
}
body.rail-open .rail-panel {
transform: translateX(0);
}
.rail-panel__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.25rem;
background: #56000d;
color: #fff;
flex-shrink: 0;
}
.rail-panel__title {
font-size: 1.1rem;
font-weight: bold;
letter-spacing: 0.1em;
}
.rail-panel__close {
background: transparent;
border: none;
color: #fff;
font-size: 1.5rem;
line-height: 1;
cursor: pointer;
padding: 0 0.25rem;
}
.rail-panel__close:hover {
opacity: 0.7;
}
.rail-panel__content {
padding: 1.25rem;
overflow-y: auto;
flex: 1;
}
.rail-panel__loading {
color: #888;
text-align: center;
padding: 2rem 0;
}
.rail-panel__content .mw-parser-output h3 {
font-size: 1rem;
color: #56000d;
border-left: 3px solid #56000d;
padding-left: 0.5rem;
margin: 1rem 0 0.5rem 0;
}
.rail-panel__content .mw-parser-output h3:first-child {
margin-top: 0;
}
.rail-panel__content .mw-parser-output ul {
list-style: none;
padding: 0;
margin: 0 0 0.75rem 0;
}
.rail-panel__content .mw-parser-output li {
margin-bottom: 0.25rem;
}
.rail-panel__content .mw-parser-output a {
display: block;
padding: 0.5rem 0.75rem;
color: #333;
text-decoration: none;
border-radius: 0.4rem;
transition: background 0.15s, color 0.15s;
}
.rail-panel__content .mw-parser-output a:hover {
background: rgba(86, 0, 13, 0.08);
color: #56000d;
}
.rail-overlay {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.4);
z-index: 999;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
}
body.rail-open .rail-overlay {
opacity: 1;
pointer-events: auto;
}
/* ============================================
6. 全局页脚(暗红渐变,铺满视口宽度)
============================================ */
.citizen-footer {
margin: 2rem -1.5rem 0 -1.5rem;
padding: 3rem 2rem 2rem;
width: calc(100% + 3rem);
box-sizing: border-box;
background: linear-gradient(180deg, #2a0006 0%, #56000d 100%);
color: rgba(255, 255, 255, 0.85);
border-top: none;
flex-shrink: 0;
}
.citizen-footer > * {
max-width: 80rem;
margin-left: auto;
margin-right: auto;
}
.citizen-footer__content {
display: block;
text-align: center;
padding-bottom: 2rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.citizen-footer__siteinfo {
display: inline-block;
text-align: center;
margin: 0 auto;
}
.citizen-footer__sitetitle {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
font-size: 1.5rem;
font-weight: bold;
color: #fff;
letter-spacing: 0.05em;
margin-bottom: 0.75rem;
}
.citizen-footer__sitetitle .mw-logo-icon {
width: 2.5rem;
height: 2.5rem;
filter: brightness(0) invert(1);
}
.citizen-footer__sitetitle .mw-logo-wordmark {
color: #fff;
}
.citizen-footer__desc {
color: rgba(255, 255, 255, 0.75);
font-size: 0.95rem;
line-height: 1.7;
margin: 0 auto;
max-width: 40rem;
}
#footer-places-privacy,
#footer-places-about,
#footer-places-disclaimers,
#footer-places {
display: none;
}
.citizen-footer__bottom {
padding-top: 1.5rem;
text-align: center;
}
#footer-tagline {
color: rgba(255, 255, 255, 0.6);
font-size: 0.85rem;
letter-spacing: 0.15em;
text-transform: uppercase;
}
/* ============================================
7. 页面操作工具栏
定位参考:.mw-body(已在 2.3 设为 relative)
============================================ */
.citizen-page-header {
position: static !important;
}
.citizen-page-header-inner {
position: static !important;
}
.citizen-page-actions {
position: absolute !important;
top: 2rem !important;
right: 2rem !important;
z-index: 10 !important;
display: flex !important;
flex-direction: column !important;
align-items: flex-end !important;
gap: 0.4rem !important;
margin: 0 !important;
padding: 0 !important;
}
.citizen-page-actions .citizen-menu__heading {
display: none !important;
}
.citizen-page-actions .citizen-menu,
.citizen-page-actions .citizen-menu__content,
.citizen-page-actions .citizen-menu__content-list {
display: flex !important;
flex-direction: column !important;
align-items: flex-end !important;
gap: 0.4rem !important;
margin: 0 !important;
padding: 0 !important;
list-style: none !important;
}
.citizen-page-actions .mw-list-item,
.citizen-page-actions .citizen-share-trigger,
.citizen-page-actions .citizen-dropdown-details {
flex: 0 0 auto !important;
width: auto !important;
margin: 0 !important;
padding: 0 !important;
}
.citizen-page-actions .citizen-share-trigger { order: 0 !important; }
.citizen-page-actions #ca-view { order: 1 !important; }
.citizen-page-actions #ca-ve-edit { order: 2 !important; }
.citizen-page-actions #ca-edit { order: 3 !important; }
.citizen-page-actions #ca-history { order: 4 !important; }
.citizen-page-actions #ca-nstab-main { order: 5 !important; }
.citizen-page-actions #ca-talk { order: 6 !important; }
.citizen-page-actions #citizen-page-more-dropdown { order: 7 !important; }
.citizen-page-actions .mw-list-item > a,
.citizen-page-actions .citizen-share,
.citizen-page-actions .citizen-dropdown-summary {
all: unset !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 2.5rem !important;
min-width: 2.5rem !important;
max-width: 2.5rem !important;
height: 2.5rem !important;
min-height: 2.5rem !important;
max-height: 2.5rem !important;
padding: 0 !important;
margin: 0 !important;
border: none !important;
border-radius: 0.75rem !important;
background: #56000d !important;
color: #fff !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
box-sizing: border-box !important;
font-size: 1rem !important;
line-height: 1 !important;
cursor: pointer !important;
text-decoration: none !important;
transition: background 0.2s, transform 0.2s;
gap: 0 !important;
}
.citizen-page-actions .mw-list-item > a:hover,
.citizen-page-actions .citizen-share:hover,
.citizen-page-actions .citizen-dropdown-summary:hover {
background: #8b1a2b !important;
transform: translateX(-3px) !important;
}
.citizen-page-actions .mw-list-item > a > span:not(.citizen-ui-icon),
.citizen-page-actions .citizen-share > span:not(.citizen-ui-icon),
.citizen-page-actions .citizen-dropdown-summary > span:not(.citizen-ui-icon),
.citizen-page-actions > .citizen-menu .citizen-keyboard-hint-keys,
.citizen-page-actions > .citizen-menu kbd {
display: none !important;
}
.citizen-page-actions .citizen-share-trigger,
.citizen-page-actions .citizen-dropdown-details {
position: relative !important;
}
.citizen-page-actions #citizen-page-actions-more__card {
position: absolute !important;
left: calc(100% + 0.5rem) !important;
right: auto !important;
top: 0 !important;
min-width: 12rem !important;
max-width: calc(100vw - 8rem) !important;
background: #fff !important;
border-radius: 0.5rem !important;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
padding: 0.5rem !important;
z-index: 100 !important;
}
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a {
all: unset !important;
display: flex !important;
align-items: center !important;
justify-content: flex-start !important;
gap: 0.6rem !important;
width: 100% !important;
padding: 0.5rem 0.75rem !important;
border-radius: 0.4rem !important;
color: #333 !important;
font-size: 0.9rem !important;
cursor: pointer !important;
text-decoration: none !important;
box-sizing: border-box !important;
}
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a:hover {
background: rgba(86, 0, 13, 0.08) !important;
color: #56000d !important;
}
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a > span:not(.citizen-ui-icon),
.citizen-page-actions #citizen-page-actions-more__card .citizen-keyboard-hint-keys,
.citizen-page-actions #citizen-page-actions-more__card kbd {
display: inline !important;
}
.citizen-body-container {
padding-right: 5rem !important;
}
html.skin-theme-clientpref-night .citizen-page-actions .mw-list-item > a,
html.skin-theme-clientpref-night .citizen-page-actions .citizen-share,
html.skin-theme-clientpref-night .citizen-page-actions .citizen-dropdown-summary {
background: #6b1010 !important;
}
html.skin-theme-clientpref-night .citizen-page-actions .mw-list-item > a:hover,
html.skin-theme-clientpref-night .citizen-page-actions .citizen-share:hover,
html.skin-theme-clientpref-night .citizen-page-actions .citizen-dropdown-summary:hover {
background: #8b1a2b !important;
}
html.skin-theme-clientpref-night .citizen-page-actions #citizen-page-actions-more__card {
background: #2a2022 !important;
}
html.skin-theme-clientpref-night .citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a {
color: #ddd !important;
}
/* ============================================
8. 响应式断点(2 档)
- ≥1101px:完整桌面
- ≤1100px:移动端横排
- ≤700px:窄移动端
============================================ */
/* ---------- 8.1 移动端(≤1100px)---------- */
@media (max-width: 1100px) {
.citizen-page-aside {
display: none !important;
}
body.citizen-page-aside-enabled .citizen-page-container,
body.citizen-page-aside-enabled .mw-body {
padding-right: 0 !important;
}
.citizen-page-actions {
position: static !important;
flex-direction: row !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 0.25rem !important;
margin-bottom: 1rem !important;
}
.citizen-page-actions .citizen-menu,
.citizen-page-actions .citizen-menu__content,
.citizen-page-actions .citizen-menu__content-list {
flex-direction: row !important;
flex-wrap: wrap !important;
align-items: center !important;
}
.citizen-page-actions .mw-list-item > a:hover,
.citizen-page-actions .citizen-share:hover,
.citizen-page-actions .citizen-dropdown-summary:hover {
transform: none !important;
}
.citizen-body-container {
padding-right: 0 !important;
}
.citizen-page-actions #citizen-page-actions-more__card {
position: fixed !important;
top: 50% !important;
left: 50% !important;
right: auto !important;
bottom: auto !important;
transform: translate(-50%, -50%) !important;
width: 85vw !important;
max-width: 22rem !important;
max-height: 70vh !important;
overflow-y: auto !important;
z-index: 2000 !important;
}
.citizen-page-actions #citizen-page-actions-more__card .citizen-menu,
.citizen-page-actions #citizen-page-actions-more__card .citizen-menu__content,
.citizen-page-actions #citizen-page-actions-more__card .citizen-menu__content-list {
flex-direction: column !important;
align-items: stretch !important;
flex-wrap: nowrap !important;
}
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item,
.citizen-page-actions #citizen-page-actions-more__card .mw-list-item > a {
width: 100% !important;
}
}
/* ---------- 8.2 窄移动端(≤700px)---------- */
@media (max-width: 700px) {
.citizen-page-container {
padding: 0.75rem 0.75rem 0 0.75rem;
}
.mw-body {
padding: 1.25rem 1rem;
border-radius: 0.75rem;
}
#citizen-preferences-dropdown__card {
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
max-width: 100vw !important;
height: 100vh !important;
min-height: 100vh !important;
max-height: 100vh !important;
transform: none !important;
border-radius: 0 !important;
padding: 1rem !important;
overflow-y: auto !important;
z-index: 100000 !important;
}
.rail-panel {
width: 80vw;
}
.rail-container {
top: 4rem;
}
body.rail-open .rail-container {
transform: translateX(calc(-80vw + 0.5rem));
}
.citizen-footer {
margin: 1rem -0.75rem 0 -0.75rem;
width: calc(100% + 1.5rem);
padding: 2rem 1rem 1.5rem;
}
}
/* ============================================
9. 评论区:页面级独立卡片
由 Common.js 从 .mw-parser-output 中移出,
挂到 .mw-body 之后,成为 .citizen-page-container 的直接子元素。
与主内容卡片、全局页脚并列,形成三个独立区块。
依赖 JS 加上的 .comments-body--page-level 类
============================================ */
/* 9.1 独立卡片主体:与 .mw-body 视觉一致 */
.comments-body.comments-body--page-level {
margin: 2rem auto 0 auto !important;
padding: 2rem 2.5rem !important;
background: rgba(255, 255, 255, 0.97) !important;
border-radius: 1rem !important;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
box-sizing: border-box !important;
width: 100% !important;
max-width: 100% !important;
}
/* 9.2 三种宽度偏好同步(与 2.4 保持一致) */
html.citizen-feature-custom-width-clientpref-narrow .comments-body.comments-body--page-level {
max-width: 55rem !important;
}
html.citizen-feature-custom-width-clientpref-standard .comments-body.comments-body--page-level {
max-width: 80rem !important;
}
html.citizen-feature-custom-width-clientpref-wide .comments-body.comments-body--page-level {
max-width: 110rem !important;
}
html.citizen-feature-custom-width-clientpref-full .comments-body.comments-body--page-level {
max-width: 100% !important;
}
/* 9.3 夜间模式 */
html.skin-theme-clientpref-night .comments-body.comments-body--page-level {
background: rgba(30, 22, 24, 0.95) !important;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}
html.skin-theme-clientpref-pureblack .comments-body.comments-body--page-level {
background: rgba(0, 0, 0, 0.95) !important;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important;
}
/* 9.4 隐藏"检索自 URL"的 printfooter */
.mw-body-content > .printfooter {
display: none !important;
}
/* 9.5 单条评论:分隔线 */
.comments-body .c-comment {
font-size: 0.9rem;
padding: 0.75rem 0;
border-bottom: 1px solid rgba(86, 0, 13, 0.08);
}
.comments-body .c-comment:last-child {
border-bottom: none;
}
/* 9.6 评论表单 textarea:覆盖内联 style="height: 15px;" */
.comments-body textarea,
.comments-body #comment {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
min-height: 5rem !important;
font-size: 0.95rem !important;
padding: 0.5rem 0.75rem !important;
border: 1px solid rgba(86, 0, 13, 0.2) !important;
border-radius: 0.4rem !important;
background: #fff !important;
box-sizing: border-box !important;
resize: vertical !important;
font-family: inherit !important;
line-height: 1.6 !important;
display: block !important;
}
/* 9.7 回复链接 */
.comments-body .comments-reply-to {
font-size: 0.85rem;
color: #56000d;
text-decoration: none;
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
}
.comments-body .comments-reply-to:hover {
background: rgba(86, 0, 13, 0.08);
}
/* 9.8 "发表评论"/"显示预览"按钮 */
.comments-body .site-button {
background: #56000d;
color: #fff;
border: none;
padding: 0.5rem 1.2rem;
border-radius: 0.4rem;
font-size: 0.9rem;
cursor: pointer;
margin-right: 0.5rem;
margin-top: 0.75rem;
font-family: inherit;
transition: background 0.2s;
}
.comments-body .site-button:hover {
background: #8b1a2b;
}
/* 9.9 编辑/取消表单按钮 */
.comments-body .c-comment-edit-form-save,
.comments-body .c-comment-edit-form-cancel {
font-size: 0.85rem;
padding: 0.35rem 0.9rem;
margin-right: 0.5rem;
border-radius: 0.4rem;
border: none;
cursor: pointer;
font-family: inherit;
}
.comments-body .c-comment-edit-form-save {
background: #56000d;
color: #fff;
}
.comments-body .c-comment-edit-form-save:hover {
background: #8b1a2b;
}
.comments-body .c-comment-edit-form-cancel {
background: transparent;
color: #56000d;
border: 1px solid rgba(86, 0, 13, 0.2);
}
/* 9.10 排序选择、自动刷新控件 */
.comments-body .c-order {
font-size: 0.85rem;
color: #666;
margin-bottom: 0.5rem;
}
.comments-body .c-order select {
padding: 0.25rem 0.5rem;
border: 1px solid rgba(86, 0, 13, 0.2);
border-radius: 0.3rem;
font-family: inherit;
font-size: 0.85rem;
}
.comments-body .c-spy a {
color: #56000d;
text-decoration: none;
font-size: 0.85rem;
}
.comments-body .c-spy a:hover {
text-decoration: underline;
}
/* 9.11 "添加您的评论"标题 */
.comments-body .c-form-title {
font-size: 1rem;
font-weight: bold;
color: #56000d;
margin-bottom: 0.75rem;
}
/* 9.12 评论区内部夜间模式细节 */
html.skin-theme-clientpref-night .comments-body .c-comment {
border-bottom-color: rgba(212, 165, 176, 0.12);
}
html.skin-theme-clientpref-night .comments-body textarea,
html.skin-theme-clientpref-night .comments-body #comment {
background: rgba(30, 22, 24, 0.6) !important;
border-color: rgba(212, 165, 176, 0.25) !important;
color: #ddd !important;
}
html.skin-theme-clientpref-night .comments-body .comments-reply-to {
color: #d4a5b0;
}
html.skin-theme-clientpref-night .comments-body .comments-reply-to:hover {
background: rgba(212, 165, 176, 0.1);
}
html.skin-theme-clientpref-night .comments-body .c-form-title {
color: #d4a5b0;
}
/* 9.13 移动端:评论区内边距收紧 */
@media (max-width: 700px) {
.comments-body.comments-body--page-level {
padding: 1.25rem 1rem !important;
border-radius: 0.75rem !important;
}
}