|
|
| (未显示同一用户的7个中间版本) |
| 第1行: |
第1行: |
| /* 这里所有CSS都会加载给Citizen皮肤的用户 */ | | /* 这里所有CSS都会加载给Citizen皮肤的用户 */ |
| /* ===== Citizen皮肤 春节特别版 ===== */
| |
| /* 适配:代码块、表格、弹窗、深色模式文字变白、链接不变 */
| |
|
| |
| /* ---------- 1. 基础变量 ---------- */
| |
| :root {
| |
| /* 主色:红色调(春节) */
| |
| --color-primary__h: 350;
| |
| --color-primary__s: 80%;
| |
| --color-primary__l: 55%;
| |
|
| |
| /* 链接颜色固定,不受深色模式影响 */
| |
| --color-link-fixed: #b03a2e;
| |
| --color-link-visited-fixed: #884538;
| |
| --color-link-hover-fixed: #e67e22;
| |
| }
| |
|
| |
| /* ---------- 2. 链接颜色(固定不变) ---------- */
| |
| /* 正文里的普通链接(保持红色) */
| |
| .mw-parser-output a,
| |
| .mw-body-content a:not(.citizen-button):not(.oo-ui-buttonElement-button):not(.mw-ui-button) {
| |
| color: var(--color-link-fixed, #b03a2e) !important;
| |
| }
| |
|
| |
| /* 访问过的链接 */
| |
| .mw-parser-output a:visited,
| |
| .mw-body-content a:visited:not(.citizen-button):not(.oo-ui-buttonElement-button):not(.mw-ui-button) {
| |
| color: var(--color-link-visited-fixed, #884538) !important;
| |
| }
| |
|
| |
| /* 悬停链接 */
| |
| .mw-parser-output a:hover,
| |
| .mw-body-content a:hover:not(.citizen-button):not(.oo-ui-buttonElement-button):not(.mw-ui-button) {
| |
| color: var(--color-link-hover-fixed, #e67e22) !important;
| |
| }
| |
|
| |
| /* ---------- 3. 普通文字 ---------- */
| |
| /* 浅色模式:正常文字颜色由皮肤变量控制,不用改 */
| |
| /* 深色模式:普通文字变白 */
| |
| .skin-citizen-dark {
| |
| color-scheme: dark;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-body-content p,
| |
| .skin-citizen-dark .mw-body-content li,
| |
| .skin-citizen-dark .mw-body-content div:not(.mw-highlight):not(.oo-ui-widget):not(.echo-notification),
| |
| .skin-citizen-dark .mw-parser-output {
| |
| color: #ffffff !important;
| |
| }
| |
|
| |
| /* 保留部分元素的深色模式默认颜色 */
| |
| .skin-citizen-dark .mw-message-box p,
| |
| .skin-citizen-dark .thumbcaption,
| |
| .skin-citizen-dark .mw-editsection {
| |
| color: inherit !important;
| |
| }
| |
|
| |
| /* ---------- 4. 代码块 ---------- */
| |
| /* 浅色模式代码块保持原样 */
| |
| /* 深色模式代码块优化 */
| |
| .skin-citizen-dark .mw-highlight,
| |
| .skin-citizen-dark pre,
| |
| .skin-citizen-dark .mw-code {
| |
| background-color: #1e1e1e !important;
| |
| color: #d4d4d4 !important;
| |
| border-color: #444 !important;
| |
| }
| |
|
| |
| /* SyntaxHighlight 扩展适配 */
| |
| .skin-citizen-dark .mw-highlight .k, /* 关键字 */
| |
| .skin-citizen-dark .mw-highlight .kd, /* 关键字声明 */
| |
| .skin-citizen-dark .mw-highlight .kn, /* 关键字(命名空间) */
| |
| .skin-citizen-dark .mw-highlight .kt { /* 类型 */
| |
| color: #569cd6 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .s, /* 字符串 */
| |
| .skin-citizen-dark .mw-highlight .s2 { /* 双引号字符串 */
| |
| color: #ce9178 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .c, /* 注释 */
| |
| .skin-citizen-dark .mw-highlight .c1 { /* 单行注释 */
| |
| color: #6a9955 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .m, /* 数字 */
| |
| .skin-citizen-dark .mw-highlight .mi { /* 整数 */
| |
| color: #b5cea8 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .nt { /* HTML标签 */
| |
| color: #F8C555 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .na { /* HTML属性名 */
| |
| color: #9cdcfe !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .kc { /* 常量 */
| |
| color: #F08D49 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight .hll { /* 高亮行 */
| |
| background-color: #3f4439 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-highlight span.linenos {
| |
| color: #898989 !important;
| |
| background-color: transparent !important;
| |
| }
| |
|
| |
| /* ---------- 5. 表格 ---------- */
| |
| /* 基础表格样式 */
| |
| .wikitable {
| |
| width: 100%;
| |
| margin: 1em 0;
| |
| }
| |
|
| |
| /* 浅色模式表格 - 保持原样,略加美化 */
| |
| .skin-citizen-light .wikitable {
| |
| background-color: #f8f9fa;
| |
| border: 1px solid #a2a9b1;
| |
| }
| |
|
| |
| .skin-citizen-light .wikitable th,
| |
| .skin-citizen-light .wikitable td {
| |
| border: 1px solid #a2a9b1;
| |
| padding: 0.2em 0.4em;
| |
| }
| |
|
| |
| .skin-citizen-light .wikitable th {
| |
| background-color: #eaecf0;
| |
| }
| |
|
| |
| /* 深色模式表格 */
| |
| .skin-citizen-dark .wikitable {
| |
| background-color: #1e1e1e !important;
| |
| border: 1px solid #444 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .wikitable th,
| |
| .skin-citizen-dark .wikitable td {
| |
| border: 1px solid #444 !important;
| |
| padding: 0.2em 0.4em;
| |
| color: #fff !important; /* 表格内文字变白 */
| |
| }
| |
|
| |
| .skin-citizen-dark .wikitable th {
| |
| background-color: #2d2d2d !important;
| |
| font-weight: bold;
| |
| }
| |
|
| |
| .skin-citizen-dark .wikitable tr:nth-child(even) {
| |
| background-color: #2a2a2a !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .wikitable tr:hover {
| |
| background-color: #3a3a3a !important;
| |
| }
| |
|
| |
| /* 可排序表格表头 */
| |
| .skin-citizen-dark .wikitable .headerSort {
| |
| background-color: #2d2d2d !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| /* ---------- 6. 弹窗/提示框 ---------- */
| |
| /* Citizen 搜索建议弹窗 */
| |
| .skin-citizen-dark .citizen-search__card {
| |
| background-color: #2d2d2d !important;
| |
| border-color: #444 !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .citizen-search__description {
| |
| color: #ccc !important;
| |
| }
| |
|
| |
| /* Echo 通知弹窗 */
| |
| .skin-citizen-dark .mw-echo-ui-notificationBadgeButtonPopupWidget-popup,
| |
| .skin-citizen-dark .mw-echo-ui-notificationItemWidget {
| |
| background-color: #2d2d2d !important;
| |
| color: #fff !important;
| |
| border-color: #444 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-echo-ui-notificationItemWidget-content-message-header {
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-echo-ui-notificationItemWidget-content-message-body {
| |
| color: #ccc !important;
| |
| }
| |
|
| |
| /* OOUI 弹窗/对话框 */
| |
| .skin-citizen-dark .oo-ui-popupWidget-popup,
| |
| .skin-citizen-dark .oo-ui-dialog-content {
| |
| background-color: #2d2d2d !important;
| |
| color: #fff !important;
| |
| border-color: #444 !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .oo-ui-labelWidget {
| |
| color: #fff !important;
| |
| }
| |
|
| |
| /* MultimediaViewer 图片查看器 */
| |
| .skin-citizen-dark .mw-mmv-wrapper {
| |
| background-color: #1e1e1e !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-mmv-title {
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-mmv-credit {
| |
| color: #ccc !important;
| |
| }
| |
|
| |
| /* 页面工具弹窗 */
| |
| .skin-citizen-dark .citizen-menu__card {
| |
| background-color: #2d2d2d !important;
| |
| border-color: #444 !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| /* ---------- 7. 福字背景(只在浅色模式显示) ---------- */
| |
| :root:not(.skin-citizen-dark) .mw-body {
| |
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.08"><text x="10" y="50" font-size="80" fill="%23c0392b">福</text></svg>');
| |
| background-repeat: repeat;
| |
| background-size: 150px;
| |
| }
| |
|
| |
| /* 如果想深色模式也有福字,可以取消下面注释(金色半透明) */
| |
| .skin-citizen-dark .mw-body {
| |
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.06"><text x="10" y="50" font-size="80" fill="%23FFD700">福</text></svg>');
| |
| background-repeat: repeat;
| |
| background-size: 150px;
| |
| }
| |
|
| |
| /* ---------- 8. 灯笼(可选,只在浅色模式显示) ---------- */
| |
| :root:not(.skin-citizen-dark) #p-logo:after {
| |
| content: "🏮";
| |
| font-size: 48px;
| |
| position: absolute;
| |
| top: -10px;
| |
| right: 20px;
| |
| transform: rotate(15deg);
| |
| text-shadow: 0 0 10px orange;
| |
| pointer-events: none;
| |
| }
| |
|
| |
| :root:not(.skin-citizen-dark) #footer:before {
| |
| content: "🏮";
| |
| font-size: 40px;
| |
| position: relative;
| |
| bottom: -10px;
| |
| left: 10px;
| |
| float: left;
| |
| margin-right: 20px;
| |
| pointer-events: none;
| |
| }
| |
|
| |
| /* ---------- 9. 深色模式其他微调 ---------- */
| |
| .skin-citizen-dark .catlinks {
| |
| background-color: #2d2d2d !important;
| |
| border-color: #444 !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-parser-output .infobox {
| |
| background-color: #1e1e1e !important;
| |
| border-color: #444 !important;
| |
| color: #fff !important;
| |
| }
| |
|
| |
| .skin-citizen-dark .mw-parser-output .infobox th,
| |
| .skin-citizen-dark .mw-parser-output .infobox td {
| |
| border-color: #444 !important;
| |
| }
| |
|
| |
| /* 确保编辑区域的文字在深色模式下可读 */
| |
| .skin-citizen-dark textarea,
| |
| .skin-citizen-dark .mw-editfont-monospace,
| |
| .skin-citizen-dark .mw-editfont-sans-serif,
| |
| .skin-citizen-dark .mw-editfont-serif {
| |
| background-color: #1e1e1e !important;
| |
| color: #fff !important;
| |
| border-color: #444 !important;
| |
| }
| |
|
| |
| /* ---------- 10. 清除缓存提示 ---------- */
| |
| /* 修改后请按 Ctrl+F5 强制刷新 */
| |
|
| |
| /* ---------- 11. 源代码编辑器边框 ---------- */
| |
| /* 普通源代码编辑框 */
| |
| .wikiEditor-ui textarea,
| |
| #wpTextbox1,
| |
| .mw-editfont-monospace,
| |
| .mw-editfont-sans-serif,
| |
| .mw-editfont-serif {
| |
| border: 2px solid var(--color-primary, #b03a2e) !important;
| |
| border-radius: 4px;
| |
| transition: border-color 0.2s ease;
| |
| }
| |
|
| |
| /* 获得焦点时的效果(可选) */
| |
| .wikiEditor-ui textarea:focus,
| |
| #wpTextbox1:focus,
| |
| .mw-editfont-monospace:focus,
| |
| .mw-editfont-sans-serif:focus,
| |
| .mw-editfont-serif:focus {
| |
| border-color: var(--color-link-hover-fixed, #e67e22) !important;
| |
| outline: none;
| |
| box-shadow: 0 0 0 2px rgba(176, 58, 46, 0.1);
| |
| }
| |
|
| |
| /* 深色模式下稍微调整 */
| |
| .skin-citizen-dark .wikiEditor-ui textarea,
| |
| .skin-citizen-dark #wpTextbox1,
| |
| .skin-citizen-dark .mw-editfont-monospace,
| |
| .skin-citizen-dark .mw-editfont-sans-serif,
| |
| .skin-citizen-dark .mw-editfont-serif {
| |
| border-color: var(--color-link-fixed, #b03a2e) !important;
| |
| background-color: #1e1e1e;
| |
| color: #fff;
| |
| }
| |
|
| |
| .skin-citizen-dark .wikiEditor-ui textarea:focus,
| |
| .skin-citizen-dark #wpTextbox1:focus,
| |
| .skin-citizen-dark .mw-editfont-monospace:focus,
| |
| .skin-citizen-dark .mw-editfont-sans-serif:focus,
| |
| .skin-citizen-dark .mw-editfont-serif:focus {
| |
| border-color: var(--color-link-hover-fixed, #e67e22) !important;
| |
| box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
| |
| }
| |