MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的13个中间版本) | |||
| 第1行: | 第1行: | ||
/* ============================================ | /* ============================================ | ||
Citizen 皮肤定制 | Citizen 皮肤定制 | ||
最后稳定版本:2026-09- | 最后稳定版本:2026-09-29 | ||
结构: | |||
1. 字体 | |||
2. 全局页面布局 | |||
3. Header 隐藏(保留偏好设置) | |||
4. 偏好设置面板 | |||
5. 侧边工具栏 Rail | |||
6. Footer 页脚 | |||
7. 页面操作工具栏 | |||
8. 响应式断点(2 档) | |||
9. 评论区 | |||
修改须知: | 修改须知: | ||
- 第 | - 第 7、9 节规则互相依赖,调整前先复制一份 | ||
- !important 用于压过 Citizen 和 Comments 扩展自带样式 | |||
- | - 测试场景:首页 / 普通页面 / 1147px / 600px / 夜间模式 | ||
- | |||
============================================ */ | ============================================ */ | ||
/* ============================================ | /* ============================================ | ||
| 第62行: | 第71行: | ||
} | } | ||
/* 2.3 | /* 2.3 主内容卡片 */ | ||
*/ | |||
.mw-body { | .mw-body { | ||
position: relative; | position: relative; | ||
| 第75行: | 第81行: | ||
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); | ||
} | } | ||
html.skin-theme-clientpref-night .mw-body { | html.skin-theme-clientpref-night .mw-body { | ||
background: rgba(30, 22, 24, 0.95); | background: rgba(30, 22, 24, 0.95); | ||
| 第85行: | 第90行: | ||
} | } | ||
html.skin-theme-clientpref-pureblack .mw-body { | html.skin-theme-clientpref-pureblack .mw-body { | ||
background: rgba(0, 0, 0, 0.95); | background: rgba(0, 0, 0, 0.95); | ||
| 第110行: | 第114行: | ||
============================================ */ | ============================================ */ | ||
.citizen-header { | .citizen-header { | ||
position: fixed !important; | position: fixed !important; | ||
| 第125行: | 第128行: | ||
} | } | ||
.citizen-header__logo, | .citizen-header__logo, | ||
.citizen-search, | .citizen-search, | ||
| 第135行: | 第137行: | ||
} | } | ||
.citizen-preferences-dropdown { | .citizen-preferences-dropdown { | ||
display: block !important; | display: block !important; | ||
| 第146行: | 第147行: | ||
============================================ */ | ============================================ */ | ||
#citizen-preferences-dropdown__card { | #citizen-preferences-dropdown__card { | ||
position: fixed !important; | position: fixed !important; | ||
| 第165行: | 第165行: | ||
} | } | ||
#citizen-preferences-details[open] + #citizen-preferences-dropdown__card, | #citizen-preferences-details[open] + #citizen-preferences-dropdown__card, | ||
body.citizen-preferences-shown #citizen-preferences-dropdown__card { | body.citizen-preferences-shown #citizen-preferences-dropdown__card { | ||
| 第171行: | 第170行: | ||
} | } | ||
.citizen-preferences-close { | .citizen-preferences-close { | ||
position: absolute; | position: absolute; | ||
| 第194行: | 第192行: | ||
============================================ */ | ============================================ */ | ||
.rail-container { | .rail-container { | ||
position: fixed; | position: fixed; | ||
| 第206行: | 第203行: | ||
} | } | ||
body.rail-open .rail-container { | body.rail-open .rail-container { | ||
transform: translateX(-19.5rem); | transform: translateX(-19.5rem); | ||
} | } | ||
.rail-button { | .rail-button { | ||
width: 2.5rem; | width: 2.5rem; | ||
| 第241行: | 第236行: | ||
} | } | ||
.rail-panel { | .rail-panel { | ||
position: fixed; | position: fixed; | ||
| 第261行: | 第255行: | ||
} | } | ||
.rail-panel__header { | .rail-panel__header { | ||
display: flex; | display: flex; | ||
| 第289行: | 第282行: | ||
} | } | ||
.rail-panel__content { | .rail-panel__content { | ||
padding: 1.25rem; | padding: 1.25rem; | ||
| 第301行: | 第293行: | ||
} | } | ||
.rail-panel__content .mw-parser-output h3 { | .rail-panel__content .mw-parser-output h3 { | ||
font-size: 1rem; | font-size: 1rem; | ||
| 第333行: | 第324行: | ||
} | } | ||
.rail-overlay { | .rail-overlay { | ||
position: fixed; | position: fixed; | ||
| 第349行: | 第339行: | ||
opacity: 1; | opacity: 1; | ||
pointer-events: auto; | pointer-events: auto; | ||
} | |||
/* 工具栏账户区的权限组标签 */ | |||
.rail-account-groups { | |||
display: flex; | |||
flex-wrap: wrap; | |||
align-items: center; | |||
gap: 0.35rem; | |||
font-size: 0.9rem; | |||
color: #555; | |||
margin-bottom: 0.75rem; | |||
line-height: 1.4; | |||
} | |||
.rail-account-groups__label { | |||
flex: 0 0 100%; | |||
margin-bottom: 0.2rem; | |||
color: #888; | |||
font-size: 0.85rem; | |||
} | |||
.rail-group-tag { | |||
display: inline-block; | |||
padding: 0.15rem 0.5rem; | |||
background: rgba(86, 0, 13, 0.1); | |||
color: #56000d; | |||
border-radius: 0.25rem; | |||
text-decoration: none; | |||
font-size: 0.85rem; | |||
white-space: nowrap; | |||
transition: background 0.15s; | |||
} | |||
a.rail-group-tag:hover { | |||
background: rgba(86, 0, 13, 0.22); | |||
} | } | ||
/* ============================================ | /* ============================================ | ||
6. | 6. 全局页脚(暗红渐变,铺满视口宽度) | ||
============================================ */ | ============================================ */ | ||
.citizen-footer { | .citizen-footer { | ||
margin: 2rem -1.5rem 0 -1.5rem; | margin: 2rem -1.5rem 0 -1.5rem; | ||
| 第368行: | 第389行: | ||
} | } | ||
.citizen-footer > * { | .citizen-footer > * { | ||
max-width: 80rem; | max-width: 80rem; | ||
| 第375行: | 第395行: | ||
} | } | ||
.citizen-footer__content { | .citizen-footer__content { | ||
display: block; | display: block; | ||
| 第388行: | 第407行: | ||
} | } | ||
.citizen-footer__sitetitle { | .citizen-footer__sitetitle { | ||
display: flex; | display: flex; | ||
| 第409行: | 第427行: | ||
} | } | ||
.citizen-footer__desc { | .citizen-footer__desc { | ||
color: rgba(255, 255, 255, 0.75); | color: rgba(255, 255, 255, 0.75); | ||
| 第418行: | 第435行: | ||
} | } | ||
#footer-places-privacy, | #footer-places-privacy, | ||
#footer-places-about, | #footer-places-about, | ||
| 第426行: | 第442行: | ||
} | } | ||
.citizen-footer__bottom { | .citizen-footer__bottom { | ||
padding-top: 1.5rem; | padding-top: 1.5rem; | ||
| 第444行: | 第459行: | ||
============================================ */ | ============================================ */ | ||
.citizen-page-header, | |||
.citizen-page-header | |||
.citizen-page-header-inner { | .citizen-page-header-inner { | ||
position: static !important; | position: static !important; | ||
} | } | ||
.citizen-page-actions { | .citizen-page-actions { | ||
position: absolute !important; | position: absolute !important; | ||
| 第466行: | 第477行: | ||
} | } | ||
.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, | ||
| 第484行: | 第493行: | ||
} | } | ||
.citizen-page-actions .mw-list-item, | .citizen-page-actions .mw-list-item, | ||
.citizen-page-actions .citizen-share-trigger, | .citizen-page-actions .citizen-share-trigger, | ||
| 第494行: | 第502行: | ||
} | } | ||
.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; } | ||
| 第504行: | 第511行: | ||
.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, | ||
| 第513行: | 第519行: | ||
justify-content: center !important; | justify-content: center !important; | ||
width: 2.5rem !important; | width: 2.5rem !important; | ||
height: 2.5rem !important; | height: 2.5rem !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
| 第531行: | 第533行: | ||
text-decoration: none !important; | text-decoration: none !important; | ||
transition: background 0.2s, transform 0.2s; | transition: background 0.2s, transform 0.2s; | ||
} | } | ||
.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, | ||
| 第542行: | 第542行: | ||
} | } | ||
.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), | ||
| 第551行: | 第550行: | ||
} | } | ||
.citizen-page-actions .citizen-share-trigger, | .citizen-page-actions .citizen-share-trigger, | ||
.citizen-page-actions .citizen-dropdown-details { | .citizen-page-actions .citizen-dropdown-details { | ||
| 第570行: | 第568行: | ||
} | } | ||
.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; | ||
| 第596行: | 第593行: | ||
} | } | ||
.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, | ||
| 第621行: | 第616行: | ||
/* ============================================ | /* ============================================ | ||
8. | 8. 响应式断点(2 档) | ||
============================================ */ | ============================================ */ | ||
/* ---------- 8.1 | /* ---------- 8.1 移动端(≤1100px)---------- */ | ||
@media | @media (max-width: 1100px) { | ||
.citizen-page-aside { | |||
.citizen-page- | display: none !important; | ||
} | } | ||
.citizen-page- | body.citizen-page-aside-enabled .citizen-page-container, | ||
body.citizen-page-aside-enabled .mw-body { | |||
.citizen-page- | padding-right: 0 !important; | ||
padding-right: | |||
} | } | ||
.citizen-page-actions { | .citizen-page-actions { | ||
position: static !important; | position: static !important; | ||
| 第711行: | 第654行: | ||
} | } | ||
.citizen-page-actions #citizen-page-actions-more__card { | .citizen-page-actions #citizen-page-actions-more__card { | ||
position: fixed !important; | position: fixed !important; | ||
| 第738行: | 第680行: | ||
} | } | ||
/* ---------- 8. | /* ---------- 8.2 窄移动端(≤700px)---------- */ | ||
@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; | ||
| 第750行: | 第691行: | ||
} | } | ||
#citizen-preferences-dropdown__card { | #citizen-preferences-dropdown__card { | ||
top: 0 !important; | top: 0 !important; | ||
| 第768行: | 第708行: | ||
} | } | ||
.rail-panel { | .rail-panel { | ||
width: 80vw; | width: 80vw; | ||
| 第779行: | 第718行: | ||
} | } | ||
.citizen-footer { | .citizen-footer { | ||
margin: 1rem -0.75rem 0 -0.75rem; | margin: 1rem -0.75rem 0 -0.75rem; | ||
| 第785行: | 第723行: | ||
padding: 2rem 1rem 1.5rem; | padding: 2rem 1rem 1.5rem; | ||
} | } | ||
} | |||
/* ============================================ | |||
9. 评论区 | |||
Comments 扩展经过 JS 处理后的 DOM 结构: | |||
.comments-body | |||
├── .c-order / .c-spy / 表单等 | |||
└── .c-item.full 顶层评论 | |||
├── .c-avatar 头像(已禁用) | |||
├── .c-container 内部容器 | |||
│ ├── .c-user 用户名 / 时间 / 分数 | |||
│ ├── .c-comment 正文 | |||
│ ├── .c-comment-edit-form | |||
│ ├── .c-actions 操作按钮 | |||
│ └── .c-item.reply 嵌套回复(由 JS 搬入) | |||
│ └── .c-container | |||
└── .visualClear | |||
技术债清理: | |||
- 统一用 display: flow-root 作为 clearfix,取代零散的 clear: both | |||
- 用 box-sizing: border-box 消除宽高计算差异 | |||
- 嵌套回复用 margin 加 padding 明确建立视觉分区 | |||
============================================ */ | |||
/* ===== 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.full { | |||
display: flow-root !important; /* 内含 clearfix,隔离浮动 */ | |||
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; | |||
} | |||
.comments-body .c-item.full:last-child { | |||
margin-bottom: 0 !important; | |||
} | |||
/* 内部容器:清空一切内外边距和边框,也做 clearfix */ | |||
.comments-body .c-container { | |||
display: flow-root !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-item.reply, | |||
.comments-body .c-item.nested-in-parent { | |||
display: flow-root !important; | |||
/* 上间距 2rem,明确分隔父评论操作栏 */ | |||
margin: 2rem 0 0 1.5rem !important; | |||
width: calc(100% - 1.5rem) !important; | |||
max-width: calc(100% - 1.5rem) !important; | |||
background: rgba(86, 0, 13, 0.08) !important; | |||
border-left: 3px solid rgba(86, 0, 13, 0.35) !important; | |||
border-radius: 0 0.75rem 0.75rem 0 !important; | |||
padding: 0.875rem 1rem 0.875rem calc(1rem - 3px) !important; | |||
box-sizing: border-box !important; | |||
position: relative !important; | |||
z-index: 1 !important; | |||
} | |||
/* ===== 9.5 头像:禁用 ===== */ | |||
.comments-body .c-avatar { | |||
display: 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; | |||
} | |||
.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 1rem 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; | |||
box-sizing: border-box !important; | |||
/* 隐藏纯文本 "|" 分隔符 */ | |||
font-size: 0 !important; | |||
line-height: 0 !important; | |||
color: transparent !important; | |||
/* 层级高于嵌套回复,点击不被拦截 */ | |||
position: relative !important; | |||
z-index: 5 !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.full { | |||
padding: 0.75rem !important; | |||
margin-bottom: 0.75rem !important; | |||
} | |||
.comments-body .c-item.reply, | |||
.comments-body .c-item.nested-in-parent { | |||
margin: 1.5rem 0 0 0.75rem !important; | |||
width: calc(100% - 0.75rem) !important; | |||
max-width: calc(100% - 0.75rem) !important; | |||
padding: 0.7rem 0.7rem 0.7rem calc(0.7rem - 3px) !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.full { | |||
background: rgba(60, 40, 45, 0.4) !important; | |||
} | |||
html.skin-theme-clientpref-night .comments-body .c-item.reply, | |||
html.skin-theme-clientpref-night .comments-body .c-item.nested-in-parent { | |||
background: rgba(60, 40, 45, 0.65) !important; | |||
border-left-color: rgba(212, 165, 176, 0.4) !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; | |||
} | } | ||
2026年9月29日 (二) 15:49的最新版本
/* ============================================
Citizen 皮肤定制
最后稳定版本:2026-09-29
结构:
1. 字体
2. 全局页面布局
3. Header 隐藏(保留偏好设置)
4. 偏好设置面板
5. 侧边工具栏 Rail
6. Footer 页脚
7. 页面操作工具栏
8. 响应式断点(2 档)
9. 评论区
修改须知:
- 第 7、9 节规则互相依赖,调整前先复制一份
- !important 用于压过 Citizen 和 Comments 扩展自带样式
- 测试场景:首页 / 普通页面 / 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;
}
/* 工具栏账户区的权限组标签 */
.rail-account-groups {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.35rem;
font-size: 0.9rem;
color: #555;
margin-bottom: 0.75rem;
line-height: 1.4;
}
.rail-account-groups__label {
flex: 0 0 100%;
margin-bottom: 0.2rem;
color: #888;
font-size: 0.85rem;
}
.rail-group-tag {
display: inline-block;
padding: 0.15rem 0.5rem;
background: rgba(86, 0, 13, 0.1);
color: #56000d;
border-radius: 0.25rem;
text-decoration: none;
font-size: 0.85rem;
white-space: nowrap;
transition: background 0.15s;
}
a.rail-group-tag:hover {
background: rgba(86, 0, 13, 0.22);
}
/* ============================================
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,
.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;
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;
}
.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 档)
============================================ */
/* ---------- 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 扩展经过 JS 处理后的 DOM 结构:
.comments-body
├── .c-order / .c-spy / 表单等
└── .c-item.full 顶层评论
├── .c-avatar 头像(已禁用)
├── .c-container 内部容器
│ ├── .c-user 用户名 / 时间 / 分数
│ ├── .c-comment 正文
│ ├── .c-comment-edit-form
│ ├── .c-actions 操作按钮
│ └── .c-item.reply 嵌套回复(由 JS 搬入)
│ └── .c-container
└── .visualClear
技术债清理:
- 统一用 display: flow-root 作为 clearfix,取代零散的 clear: both
- 用 box-sizing: border-box 消除宽高计算差异
- 嵌套回复用 margin 加 padding 明确建立视觉分区
============================================ */
/* ===== 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.full {
display: flow-root !important; /* 内含 clearfix,隔离浮动 */
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;
}
.comments-body .c-item.full:last-child {
margin-bottom: 0 !important;
}
/* 内部容器:清空一切内外边距和边框,也做 clearfix */
.comments-body .c-container {
display: flow-root !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-item.reply,
.comments-body .c-item.nested-in-parent {
display: flow-root !important;
/* 上间距 2rem,明确分隔父评论操作栏 */
margin: 2rem 0 0 1.5rem !important;
width: calc(100% - 1.5rem) !important;
max-width: calc(100% - 1.5rem) !important;
background: rgba(86, 0, 13, 0.08) !important;
border-left: 3px solid rgba(86, 0, 13, 0.35) !important;
border-radius: 0 0.75rem 0.75rem 0 !important;
padding: 0.875rem 1rem 0.875rem calc(1rem - 3px) !important;
box-sizing: border-box !important;
position: relative !important;
z-index: 1 !important;
}
/* ===== 9.5 头像:禁用 ===== */
.comments-body .c-avatar {
display: 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;
}
.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 1rem 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;
box-sizing: border-box !important;
/* 隐藏纯文本 "|" 分隔符 */
font-size: 0 !important;
line-height: 0 !important;
color: transparent !important;
/* 层级高于嵌套回复,点击不被拦截 */
position: relative !important;
z-index: 5 !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.full {
padding: 0.75rem !important;
margin-bottom: 0.75rem !important;
}
.comments-body .c-item.reply,
.comments-body .c-item.nested-in-parent {
margin: 1.5rem 0 0 0.75rem !important;
width: calc(100% - 0.75rem) !important;
max-width: calc(100% - 0.75rem) !important;
padding: 0.7rem 0.7rem 0.7rem calc(0.7rem - 3px) !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.full {
background: rgba(60, 40, 45, 0.4) !important;
}
html.skin-theme-clientpref-night .comments-body .c-item.reply,
html.skin-theme-clientpref-night .comments-body .c-item.nested-in-parent {
background: rgba(60, 40, 45, 0.65) !important;
border-left-color: rgba(212, 165, 176, 0.4) !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;
}