MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第702行: | 第702行: | ||
} | } | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
9. 评论区 | 9. 评论区 | ||
| 第710行: | 第708行: | ||
.comments-body | .comments-body | ||
├── .c-order / .c-spy / .c- | ├── .c-order / .c-spy / 表单等 | ||
└── .c-item 单条评论单元 | |||
├── .c- | ├── .c-avatar 头像(已禁用) | ||
├── .c-user | ├── .c-container 内部容器 | ||
├── .c-comment | │ ├── .c-user 用户名 / 时间 / 分数 | ||
├── .c-comment-edit-form | │ ├── .c-comment 正文 | ||
│ ├── .c-comment-edit-form | |||
└── .c-container | │ └── .c-actions 操作按钮 | ||
└── .visualClear 清浮动 | |||
嵌套回复:.c-container > .c-item.reply | |||
============================================ */ | ============================================ */ | ||
| 第746行: | 第747行: | ||
} | } | ||
/* ===== 9.3 | /* ===== 9.3 评论单元:去掉所有分隔线,改成独立区块 ===== */ | ||
.comments-body .c-item { | |||
display: block !important; | |||
width: 100% !important; | |||
max-width: 100% !important; | |||
margin: 0 0 1rem 0 !important; | |||
padding: 1rem !important; | |||
background: rgba(86, 0, 13, 0.03) !important; | |||
border: none !important; | |||
border-radius: 0.75rem !important; | |||
box-sizing: border-box !important; | |||
overflow: visible !important; | |||
} | |||
/* 最后一条不留底部间距 */ | |||
.comments-body .c-item:last-child { | |||
margin-bottom: 0 !important; | |||
} | |||
/* 内部容器:去掉一切边框、padding、margin */ | |||
.comments-body .c-container { | .comments-body .c-container { | ||
display: block !important; | display: block !important; | ||
width: 100% !important; | width: 100% !important; | ||
max-width: 100% !important; | max-width: 100% !important; | ||
padding: | padding: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
border | border: none !important; | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
} | } | ||
.comments-body . | |||
/* 清浮动元素不占空间 */ | |||
.comments-body .visualClear { | |||
clear: both !important; | |||
height: 0 !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
} | } | ||
/* ===== 9.4 | /* ===== 9.4 嵌套评论(回复):缩进 + 更浅的背景 ===== */ | ||
.comments-body .c-container .c- | .comments-body .c-container > .c-item, | ||
.comments-body .c-item .c-item { | |||
margin-left: 1.5rem !important; | margin-left: 1.5rem !important; | ||
margin-top: 0.75rem !important; | |||
width: calc(100% - 1.5rem) !important; | width: calc(100% - 1.5rem) !important; | ||
max-width: calc(100% - 1.5rem) !important; | max-width: calc(100% - 1.5rem) !important; | ||
background: rgba(86, 0, 13, 0.05) !important; | |||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
} | } | ||
| 第780行: | 第806行: | ||
margin: 0 !important; | margin: 0 !important; | ||
overflow: hidden !important; | overflow: hidden !important; | ||
float: none !important; | |||
} | } | ||
/* ===== 9.6 | /* ===== 9.6 用户信息栏 ===== */ | ||
.comments-body .c-user { | .comments-body .c-user { | ||
display: flex !important; | display: flex !important; | ||
| 第789行: | 第816行: | ||
gap: 0.5rem !important; | gap: 0.5rem !important; | ||
font-size: 0.85rem !important; | font-size: 0.85rem !important; | ||
margin | margin: 0 0 0.5rem 0 !important; | ||
padding: 0 !important; | |||
color: #666 !important; | color: #666 !important; | ||
width: 100% !important; | width: 100% !important; | ||
| 第826行: | 第854行: | ||
padding: 0 !important; | padding: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
border | border: none !important; | ||
} | } | ||
/* ===== 9.8 | /* ===== 9.8 操作工具栏:把原来的零散链接做成一条工具栏 ===== */ | ||
.comments-body .c-actions { | .comments-body .c-actions { | ||
display: flex !important; | display: flex !important; | ||
flex-wrap: wrap !important; | flex-wrap: wrap !important; | ||
align-items: center !important; | |||
gap: 0.4rem !important; | gap: 0.4rem !important; | ||
margin | margin: 0.75rem 0 0 0 !important; | ||
padding: 0.35rem 0.6rem !important; | |||
background: rgba(86, 0, 13, 0.06) !important; | |||
border: 1px solid rgba(86, 0, 13, 0.1) !important; | |||
border-radius: 0.5rem !important; | |||
width: 100% !important; | width: 100% !important; | ||
max-width: 100% !important; | max-width: 100% !important; | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
/* 隐藏纯文本 "|" 分隔符 */ | |||
font-size: 0 !important; | |||
line-height: 0 !important; | |||
color: transparent !important; | |||
} | } | ||
.comments-body .c-actions a { | /* 工具栏里的按钮 */ | ||
.comments-body .c-actions a, | |||
.comments-body .c-actions > span { | |||
display: inline-flex !important; | display: inline-flex !important; | ||
align-items: center !important; | align-items: center !important; | ||
justify-content: center !important; | justify-content: center !important; | ||
padding: 0.3rem 0.75rem !important; | padding: 0.3rem 0.75rem !important; | ||
background: | background: transparent !important; | ||
color: #56000d !important; | color: #56000d !important; | ||
text-decoration: none !important; | text-decoration: none !important; | ||
| 第861行: | 第896行: | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
flex: 0 0 auto !important; | flex: 0 0 auto !important; | ||
font-family: inherit !important; | |||
} | } | ||
| 第871行: | 第907行: | ||
.comments-body .c-actions a[href*="action=delete"], | .comments-body .c-actions a[href*="action=delete"], | ||
.comments-body .c-actions a[href*="delete"], | .comments-body .c-actions a[href*="delete"], | ||
.comments-body .c-actions | .comments-body .c-actions .comment-delete-link, | ||
.comments-body .c-actions a | .comments-body .c-actions .c-delete a { | ||
color: #bf0017 !important; | color: #bf0017 !important; | ||
} | } | ||
.comments-body .c-actions a[href*="action=delete"]:hover, | .comments-body .c-actions a[href*="action=delete"]:hover, | ||
.comments-body .c-actions a[href*="delete"]:hover, | .comments-body .c-actions a[href*="delete"]:hover, | ||
.comments-body .c-actions | .comments-body .c-actions .comment-delete-link:hover, | ||
.comments-body .c-actions a | .comments-body .c-actions .c-delete a:hover { | ||
background: #bf0017 !important; | background: #bf0017 !important; | ||
color: #fff !important; | |||
} | |||
/* 编辑按钮 */ | |||
.comments-body .c-actions .comments-edit { | |||
color: #8b1a2b !important; | |||
} | |||
.comments-body .c-actions .comments-edit:hover { | |||
background: #8b1a2b !important; | |||
color: #fff !important; | color: #fff !important; | ||
} | } | ||
| 第903行: | 第947行: | ||
} | } | ||
.comments-body .c-form-title { | .comments-body .c-form-title { | ||
font-size: 1rem; | font-size: 1rem; | ||
| 第911行: | 第954行: | ||
} | } | ||
.comments-body .site-button { | .comments-body .site-button { | ||
background: #56000d; | background: #56000d; | ||
| 第929行: | 第971行: | ||
} | } | ||
.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 { | ||
| 第980行: | 第1,021行: | ||
} | } | ||
/* ===== 9.12 | /* ===== 9.12 移动端适配 ===== */ | ||
@media (max-width: 700px) { | @media (max-width: 700px) { | ||
.comments-body.comments-body--page-level { | .comments-body.comments-body--page-level { | ||
| 第986行: | 第1,027行: | ||
border-radius: 0.75rem !important; | border-radius: 0.75rem !important; | ||
} | } | ||
.comments-body .c-container .c- | .comments-body .c-item { | ||
padding: 0.75rem !important; | |||
margin-bottom: 0.75rem !important; | |||
} | |||
.comments-body .c-container > .c-item, | |||
.comments-body .c-item .c-item { | |||
margin-left: 0.75rem !important; | margin-left: 0.75rem !important; | ||
width: calc(100% - 0.75rem) !important; | width: calc(100% - 0.75rem) !important; | ||
max-width: calc(100% - 0.75rem) !important; | max-width: calc(100% - 0.75rem) !important; | ||
} | } | ||
.comments-body .c-actions a { | .comments-body .c-actions { | ||
padding: 0.25rem 0.4rem !important; | |||
gap: 0.25rem !important; | |||
} | |||
.comments-body .c-actions a, | |||
.comments-body .c-actions > span { | |||
padding: 0.25rem 0.6rem !important; | padding: 0.25rem 0.6rem !important; | ||
font-size: 0.75rem !important; | font-size: 0.75rem !important; | ||
| 第1,005行: | 第1,056行: | ||
} | } | ||
/* ===== 9.13 | /* ===== 9.13 夜间模式 ===== */ | ||
html.skin-theme-clientpref-night .comments-body.comments-body--page-level { | html.skin-theme-clientpref-night .comments-body.comments-body--page-level { | ||
background: rgba(30, 22, 24, 0.95) !important; | background: rgba(30, 22, 24, 0.95) !important; | ||
| 第1,014行: | 第1,065行: | ||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important; | box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important; | ||
} | } | ||
html.skin-theme-clientpref-night .comments-body .c- | html.skin-theme-clientpref-night .comments-body .c-item { | ||
background: rgba(60, 40, 45, 0.4) !important; | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-container > .c-item, | |||
html.skin-theme-clientpref-night .comments-body .c-item .c-item { | |||
background: rgba(60, 40, 45, 0.6) !important; | |||
} | } | ||
html.skin-theme-clientpref-night .comments-body textarea, | html.skin-theme-clientpref-night .comments-body textarea, | ||
| 第1,032行: | 第1,087行: | ||
color: #d4a5b0 !important; | color: #d4a5b0 !important; | ||
} | } | ||
html.skin-theme-clientpref-night .comments-body .c-actions | html.skin-theme-clientpref-night .comments-body .c-actions { | ||
background: rgba(212, 165, 176, 0. | background: rgba(60, 40, 45, 0.5) !important; | ||
border-color: rgba(212, 165, 176, 0.2) !important; | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-actions a, | |||
html.skin-theme-clientpref-night .comments-body .c-actions > span { | |||
color: #d4a5b0 !important; | color: #d4a5b0 !important; | ||
} | } | ||
| 第1,039行: | 第1,098行: | ||
background: #8b1a2b !important; | background: #8b1a2b !important; | ||
color: #fff !important; | color: #fff !important; | ||
} | |||
html.skin-theme-clientpref-night .comments-body .c-actions .comment-delete-link, | |||
html.skin-theme-clientpref-night .comments-body .c-actions .c-delete a { | |||
color: #ff8fa3 !important; | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-actions .comment-delete-link:hover, | |||
html.skin-theme-clientpref-night .comments-body .c-actions .c-delete a:hover { | |||
background: #bf0017 !important; | |||
color: #fff !important; | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-actions .comments-edit { | |||
color: #d4a5b0 !important; | |||
} | } | ||
2026年9月29日 (二) 15:32的版本
/* ============================================
Citizen 皮肤定制
最后稳定版本:2026-09-29
结构:
1. 字体
2. 全局页面布局
3. Header 隐藏(保留偏好设置)
4. 偏好设置面板
5. 侧边工具栏 Rail
6. Footer 页脚
7. 页面操作工具栏
8. 响应式断点(2 档)
9. 评论区
修改须知:
- 第 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 页面容器:与四周留空隙 */
.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 主内容卡片 */
.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. 评论区
Comments 扩展的实际 DOM 结构:
.comments-body
├── .c-order / .c-spy / 表单等
└── .c-item 单条评论单元
├── .c-avatar 头像(已禁用)
├── .c-container 内部容器
│ ├── .c-user 用户名 / 时间 / 分数
│ ├── .c-comment 正文
│ ├── .c-comment-edit-form
│ └── .c-actions 操作按钮
└── .visualClear 清浮动
嵌套回复:.c-container > .c-item.reply
============================================ */
/* ===== 9.1 独立卡片主体 ===== */
.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 三种宽度偏好 ===== */
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 评论单元:去掉所有分隔线,改成独立区块 ===== */
.comments-body .c-item {
display: block !important;
width: 100% !important;
max-width: 100% !important;
margin: 0 0 1rem 0 !important;
padding: 1rem !important;
background: rgba(86, 0, 13, 0.03) !important;
border: none !important;
border-radius: 0.75rem !important;
box-sizing: border-box !important;
overflow: visible !important;
}
/* 最后一条不留底部间距 */
.comments-body .c-item:last-child {
margin-bottom: 0 !important;
}
/* 内部容器:去掉一切边框、padding、margin */
.comments-body .c-container {
display: block !important;
width: 100% !important;
max-width: 100% !important;
padding: 0 !important;
margin: 0 !important;
border: none !important;
box-sizing: border-box !important;
}
/* 清浮动元素不占空间 */
.comments-body .visualClear {
clear: both !important;
height: 0 !important;
margin: 0 !important;
padding: 0 !important;
}
/* ===== 9.4 嵌套评论(回复):缩进 + 更浅的背景 ===== */
.comments-body .c-container > .c-item,
.comments-body .c-item .c-item {
margin-left: 1.5rem !important;
margin-top: 0.75rem !important;
width: calc(100% - 1.5rem) !important;
max-width: calc(100% - 1.5rem) !important;
background: rgba(86, 0, 13, 0.05) !important;
box-sizing: border-box !important;
}
/* ===== 9.5 头像:禁用 ===== */
.comments-body .c-avatar {
display: none !important;
width: 0 !important;
min-width: 0 !important;
max-width: 0 !important;
height: 0 !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden !important;
float: none !important;
}
/* ===== 9.6 用户信息栏 ===== */
.comments-body .c-user {
display: flex !important;
flex-wrap: wrap !important;
align-items: center !important;
gap: 0.5rem !important;
font-size: 0.85rem !important;
margin: 0 0 0.5rem 0 !important;
padding: 0 !important;
color: #666 !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
}
.comments-body .c-user a {
color: #56000d !important;
font-weight: bold !important;
text-decoration: none !important;
}
.comments-body .c-user a:hover {
text-decoration: underline !important;
}
.comments-body .c-time,
.comments-body .c-score,
.comments-body .c-score-title {
font-size: 0.8rem !important;
color: #999 !important;
font-weight: normal !important;
}
/* ===== 9.7 评论正文 ===== */
.comments-body .c-comment {
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
overflow-wrap: break-word !important;
word-wrap: break-word !important;
word-break: break-word !important;
font-size: 0.9rem !important;
line-height: 1.6 !important;
padding: 0 !important;
margin: 0 !important;
border: none !important;
}
/* ===== 9.8 操作工具栏:把原来的零散链接做成一条工具栏 ===== */
.comments-body .c-actions {
display: flex !important;
flex-wrap: wrap !important;
align-items: center !important;
gap: 0.4rem !important;
margin: 0.75rem 0 0 0 !important;
padding: 0.35rem 0.6rem !important;
background: rgba(86, 0, 13, 0.06) !important;
border: 1px solid rgba(86, 0, 13, 0.1) !important;
border-radius: 0.5rem !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
/* 隐藏纯文本 "|" 分隔符 */
font-size: 0 !important;
line-height: 0 !important;
color: transparent !important;
}
/* 工具栏里的按钮 */
.comments-body .c-actions a,
.comments-body .c-actions > span {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
padding: 0.3rem 0.75rem !important;
background: transparent !important;
color: #56000d !important;
text-decoration: none !important;
border-radius: 0.4rem !important;
font-size: 0.8rem !important;
line-height: 1.2 !important;
white-space: nowrap !important;
transition: background 0.15s, color 0.15s !important;
border: none !important;
margin: 0 !important;
box-sizing: border-box !important;
flex: 0 0 auto !important;
font-family: inherit !important;
}
.comments-body .c-actions a:hover {
background: #56000d !important;
color: #fff !important;
}
/* 删除 / 隐藏类按钮用红色 */
.comments-body .c-actions a[href*="action=delete"],
.comments-body .c-actions a[href*="delete"],
.comments-body .c-actions .comment-delete-link,
.comments-body .c-actions .c-delete a {
color: #bf0017 !important;
}
.comments-body .c-actions a[href*="action=delete"]:hover,
.comments-body .c-actions a[href*="delete"]:hover,
.comments-body .c-actions .comment-delete-link:hover,
.comments-body .c-actions .c-delete a:hover {
background: #bf0017 !important;
color: #fff !important;
}
/* 编辑按钮 */
.comments-body .c-actions .comments-edit {
color: #8b1a2b !important;
}
.comments-body .c-actions .comments-edit:hover {
background: #8b1a2b !important;
color: #fff !important;
}
/* ===== 9.9 评论表单 ===== */
.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;
}
.comments-body .c-form-title {
font-size: 1rem;
font-weight: bold;
color: #56000d;
margin-bottom: 0.75rem;
}
.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;
}
.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 隐藏"检索自 URL"的 printfooter ===== */
.mw-body-content > .printfooter {
display: none !important;
}
/* ===== 9.12 移动端适配 ===== */
@media (max-width: 700px) {
.comments-body.comments-body--page-level {
padding: 1.25rem 1rem !important;
border-radius: 0.75rem !important;
}
.comments-body .c-item {
padding: 0.75rem !important;
margin-bottom: 0.75rem !important;
}
.comments-body .c-container > .c-item,
.comments-body .c-item .c-item {
margin-left: 0.75rem !important;
width: calc(100% - 0.75rem) !important;
max-width: calc(100% - 0.75rem) !important;
}
.comments-body .c-actions {
padding: 0.25rem 0.4rem !important;
gap: 0.25rem !important;
}
.comments-body .c-actions a,
.comments-body .c-actions > span {
padding: 0.25rem 0.6rem !important;
font-size: 0.75rem !important;
}
.comments-body .c-user {
font-size: 0.8rem !important;
gap: 0.35rem !important;
}
.comments-body .c-time,
.comments-body .c-score {
font-size: 0.75rem !important;
}
}
/* ===== 9.13 夜间模式 ===== */
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;
}
html.skin-theme-clientpref-night .comments-body .c-item {
background: rgba(60, 40, 45, 0.4) !important;
}
html.skin-theme-clientpref-night .comments-body .c-container > .c-item,
html.skin-theme-clientpref-night .comments-body .c-item .c-item {
background: rgba(60, 40, 45, 0.6) !important;
}
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 .c-form-title {
color: #d4a5b0;
}
html.skin-theme-clientpref-night .comments-body .c-user {
color: #999 !important;
}
html.skin-theme-clientpref-night .comments-body .c-user a {
color: #d4a5b0 !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions {
background: rgba(60, 40, 45, 0.5) !important;
border-color: rgba(212, 165, 176, 0.2) !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions a,
html.skin-theme-clientpref-night .comments-body .c-actions > span {
color: #d4a5b0 !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions a:hover {
background: #8b1a2b !important;
color: #fff !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions .comment-delete-link,
html.skin-theme-clientpref-night .comments-body .c-actions .c-delete a {
color: #ff8fa3 !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions .comment-delete-link:hover,
html.skin-theme-clientpref-night .comments-body .c-actions .c-delete a:hover {
background: #bf0017 !important;
color: #fff !important;
}
html.skin-theme-clientpref-night .comments-body .c-actions .comments-edit {
color: #d4a5b0 !important;
}