MediaWiki:Common.css:修订间差异
外观
工具栏按钮样式替换为图片旁浮动按钮样式 |
分类引导框层级提升;修正 font-size 笔误 |
||
| (未显示同一用户的2个中间版本) | |||
| 第402行: | 第402行: | ||
.ty-ve-br:hover { | .ty-ve-br:hover { | ||
background: var(--wiki-primary-deep); | background: var(--wiki-primary-deep); | ||
} | |||
/* 保存前分类引导对话框(配 Common.js) */ | |||
.ty-cg-dialog .oo-ui-processDialog-location { | |||
min-height: 2.6em; | |||
} | |||
.ty-cg-tip { | |||
margin: 0 0 10px; | |||
line-height: 1.7; | |||
color: #3c4a45; | |||
} | |||
.ty-cg-list { | |||
border: 1px solid #d9e2dd; | |||
background: #fff; | |||
} | |||
.ty-cg-group + .ty-cg-group { | |||
border-top: 1px solid #e6ece9; | |||
} | |||
.ty-cg-head { | |||
display: flex; | |||
align-items: center; | |||
gap: 8px; | |||
width: 100%; | |||
padding: 10px 12px; | |||
border: 0; | |||
background: #f4f8f6; | |||
cursor: pointer; | |||
font-size: 14px; | |||
font-weight: 600; | |||
color: #1f2c27; | |||
text-align: left; | |||
} | |||
.ty-cg-head:hover { | |||
background: var(--wiki-primary-tint, #E7F1EC); | |||
} | |||
.ty-cg-arrow { | |||
display: inline-block; | |||
width: 14px; | |||
color: var(--wiki-primary, #2E8B74); | |||
transition: transform 0.15s; | |||
} | |||
.ty-cg-open .ty-cg-arrow { | |||
transform: rotate( 90deg ); | |||
} | |||
.ty-cg-gname { | |||
font-weight: 700; | |||
} | |||
.ty-cg-ghint { | |||
margin-left: auto; | |||
font-size: 12px; | |||
font-weight: 400; | |||
color: #7d8a85; | |||
} | |||
.ty-cg-body { | |||
display: none; | |||
flex-wrap: wrap; | |||
gap: 6px; | |||
padding: 10px 12px 12px 34px; | |||
} | |||
.ty-cg-open .ty-cg-body { | |||
display: flex; | |||
} | |||
.ty-cg-cat { | |||
display: inline-flex; | |||
align-items: center; | |||
gap: 6px; | |||
padding: 6px 10px; | |||
border: 1px solid #cfd9d4; | |||
background: #fafcfb; | |||
cursor: pointer; | |||
font-size: 13px; | |||
line-height: 1.4; | |||
user-select: none; | |||
} | |||
.ty-cg-cat:hover { | |||
border-color: var(--wiki-primary, #2E8B74); | |||
} | |||
.ty-cg-cat input { | |||
accent-color: var(--wiki-primary, #2E8B74); | |||
margin: 0; | |||
} | |||
.ty-cg-cat:has( input:checked ) { | |||
border-color: var(--wiki-primary, #2E8B74); | |||
background: var(--wiki-primary-tint, #E7F1EC); | |||
font-weight: 600; | |||
} | |||
.ty-cg-count { | |||
margin: 10px 0 0; | |||
font-size: 13px; | |||
color: #5a6a64; | |||
} | |||
@media ( max-width: 768px ) { | |||
.ty-cg-body { | |||
padding: 8px 10px 10px 26px; | |||
} | |||
.ty-cg-cat { | |||
padding: 5px 8px; | |||
font-size: 12.5px; | |||
} | |||
} | |||
/* ===== 移动端:可视化编辑器弹出菜单适配(2026-10-01) ===== | |||
窄屏下 OOUI 会把下拉菜单按「右缘对齐按钮」来定位,位于工具栏右侧的 | |||
菜单(页面选项、切换编辑器等)会被算出负的 left,左半部分(图标与 | |||
文字)被挤出屏幕。这里把弹层改为与工具栏同宽、整栏展开。 */ | |||
@media ( max-width: 768px ) { | |||
.ve-ui-toolbar .oo-ui-toolbar-popups.oo-ui-toolbar-narrow { | |||
left: 0 !important; | |||
right: 0 !important; | |||
} | |||
.ve-ui-toolbar .oo-ui-toolbar-popups.oo-ui-toolbar-narrow > .oo-ui-toolGroup-tools { | |||
left: 0 !important; | |||
right: 0 !important; | |||
top: 0 !important; | |||
width: auto !important; | |||
margin-left: 0 !important; | |||
max-width: none !important; | |||
box-sizing: border-box; | |||
max-height: calc( 100vh - 190px ) !important; | |||
overflow-y: auto !important; | |||
-webkit-overflow-scrolling: touch; | |||
} | |||
} | |||
/* 分类引导框:确保位于 VE 各浮层之上 */ | |||
.ty-cg-wm { | |||
position: relative; | |||
z-index: 500; | |||
} | } | ||
2026年10月1日 (四) 18:45的最新版本
/* 土域百科 设计系统 v3 —— 现代化排版,白与浅灰为主,色彩只用于导航与层级 */
:root {
--wiki-bg: #FAF9F4;
--wiki-text: #22312C;
--wiki-text-secondary: #66766F;
--wiki-text-tertiary: #93A09A;
--wiki-primary: #2E8B74;
--wiki-primary-deep: #226F5D;
--wiki-primary-tint: #E7F1EC;
--wiki-accent: #B8862B;
--wiki-line: #e3e0d8;
--color-progressive: var(--wiki-primary);
--color-progressive--hover: var(--wiki-primary-deep);
--color-progressive--active: var(--wiki-primary-deep);
}
body {
background-color: var(--wiki-bg);
color: var(--wiki-text);
}
/* ===== 阅读排版 ===== */
.mw-parser-output {
line-height: 1.75;
}
.mw-parser-output p {
margin: .65em 0 1em;
}
.mw-parser-output h2 {
border-bottom: 2px solid #dbe7e1;
padding-bottom: .2em;
margin-top: 1.6em;
}
.mw-parser-output h3 {
margin-top: 1.3em;
}
.mw-parser-output blockquote {
border-left: 3px solid var(--wiki-primary);
background: var(--wiki-primary-tint);
margin: 1em 0;
padding: 8px 16px;
}
.mw-parser-output div.thumbinner {
border: 1px solid var(--wiki-line);
background: #fff;
padding: 4px;
}
.mw-parser-output ul {
margin: .4em 0 1em;
}
/* ===== 链接与交互 ===== */
.mw-parser-output a:not(.new),
.mw-body-content a:not(.new) {
color: var(--wiki-primary);
}
.mw-parser-output a:visited:not(.new),
.mw-body-content a:visited:not(.new) {
color: var(--wiki-primary-deep);
}
::selection {
background: var(--wiki-primary-tint);
}
/* 表格 */
table.wikitable > thead > tr > th,
table.wikitable > tbody > tr > th,
table.wikitable > tr > th {
background: var(--wiki-primary-tint);
}
table.wikitable {
border-color: var(--wiki-line);
}
/* 分类栏 */
.catlinks {
background: var(--wiki-primary-tint);
border-color: #d8e4dd;
}
/* ===== 通用组件 ===== */
/* 按钮样式的链接 */
.ty-btn {
display: inline-block;
background: var(--wiki-primary);
color: #fff !important;
padding: 6px 16px;
font-weight: 600;
}
.ty-btn:visited { color: #fff !important; }
/* 面板容器 */
.ty-panel {
border: 1px solid var(--wiki-line);
background: #fff;
padding: 14px 18px;
margin: 10px 0 16px;
}
/* ===== 首页门户 ===== */
/* 顶部公告条 */
.ty-notice {
background: #fff;
border: 1px solid var(--wiki-line);
border-left: 4px solid var(--wiki-accent);
padding: 8px 14px;
margin-bottom: 14px;
font-size: .95em;
}
/* 欢迎横幅 */
.ty-hero {
background: var(--wiki-primary-tint);
border: 1px solid #d8e4dd;
padding: 26px 28px 22px;
margin-bottom: 14px;
}
.ty-hero-title {
font-size: 1.85em;
font-weight: 600;
line-height: 1.25;
}
.ty-hero-desc {
margin-top: 6px;
color: var(--wiki-text-secondary);
}
.ty-hero-meta {
margin-top: 12px;
font-size: .9em;
color: var(--wiki-text-tertiary);
}
/* 创建词条入口 */
.ty-create {
background: #fff;
border: 1px solid var(--wiki-line);
border-top: 3px solid var(--wiki-primary);
padding: 16px 18px 12px;
margin-bottom: 14px;
}
.ty-create-t {
font-weight: 600;
margin-bottom: 8px;
}
.ty-create-d {
margin-top: 8px;
font-size: .9em;
color: var(--wiki-text-secondary);
}
/* 新手四步 */
.ty-steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
gap: 10px;
margin-bottom: 18px;
}
.ty-step {
background: #fff;
border: 1px solid var(--wiki-line);
padding: 12px 14px;
display: flex;
gap: 10px;
align-items: flex-start;
}
.ty-step-num {
flex: none;
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--wiki-primary);
color: #fff;
font-size: .85em;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
margin-top: 1px;
}
.ty-step-t { font-weight: 600; }
.ty-step-d {
font-size: .88em;
color: var(--wiki-text-secondary);
margin-top: 2px;
line-height: 1.55;
}
/* 分类入口卡片 */
.ty-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 12px;
margin-bottom: 18px;
}
.ty-card {
background: #fff;
border: 1px solid var(--wiki-line);
}
.ty-card-h {
padding: 7px 14px;
color: #fff;
font-weight: 600;
}
.ty-card-h small {
font-weight: 400;
opacity: .85;
margin-left: 6px;
letter-spacing: .06em;
}
.ty-card-h--intro { background: var(--wiki-primary); }
.ty-card-h--server { background: var(--wiki-accent); }
.ty-card-h--site { background: #66766F; }
.ty-card-b { padding: 8px 14px 10px; }
.ty-card-b ul {
list-style: none;
margin: 0;
padding: 0;
}
.ty-card-b li {
border-bottom: 1px dashed #eceae4;
padding: 5px 0;
margin: 0;
}
.ty-card-b li:last-child { border-bottom: 0; }
.ty-cols-2 ul {
columns: 2;
column-gap: 22px;
}
/* 公告列表 */
.ty-announce {
border: 1px solid var(--wiki-line);
background: #fff;
padding: 10px 16px;
}
.ty-announce ul {
list-style: none;
margin: 0;
padding: 0;
}
.ty-announce li {
border-bottom: 1px dashed #eceae4;
padding: 5px 0;
margin: 0;
}
.ty-announce li:last-child { border-bottom: 0; }
/* ===== 目录导航(深色磁贴,参考 PRTS) ===== */
.ty-dir {
margin: 0 0 18px;
}
.ty-dir-head {
display: flex;
align-items: baseline;
gap: 12px;
background: #182420;
border-left: 4px solid var(--wiki-primary);
color: #fff;
padding: 9px 16px;
}
.ty-dir-name {
font-weight: 700;
font-size: 1.02em;
letter-spacing: .08em;
}
.ty-dir-en {
color: #7d948b;
font-size: .72em;
letter-spacing: .22em;
}
.ty-dir-more {
margin-left: auto;
font-size: .82em;
color: #9fd8cb;
}
.mw-parser-output a:has(> .ty-dir-more),
.mw-parser-output a:has(> .ty-tile) {
text-decoration: none;
}
a:hover .ty-dir-more { color: #d3f4ec; }
.ty-tiles {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
gap: 6px;
margin-top: 6px;
}
.ty-tile {
display: block;
background: #22312c;
border-left: 3px solid transparent;
padding: 16px 16px 13px;
transition: background .15s ease, border-color .15s ease;
}
.ty-tile-name {
display: block;
color: #f4f7f5;
font-weight: 600;
font-size: .98em;
letter-spacing: .03em;
}
.ty-tile-meta {
display: block;
margin-top: 5px;
color: #8ba197;
font-size: .78em;
}
a:hover .ty-tile {
background: #2c443c;
border-left-color: var(--wiki-primary);
}
a:hover .ty-tile-name { color: #ffffff; }
a:hover .ty-tile-meta { color: #b9d6cd; }
/* 修复:维基解析器会把磁贴链接包进 <p>,用 display:contents 让链接直接参与网格 */
.ty-tiles > p {
display: contents;
}
/* ===== 移动端适配(≤768px) ===== */
@media (max-width: 768px) {
/* 首页组件收紧 */
.ty-hero { padding: 18px 16px 14px; }
.ty-hero-title { font-size: 1.5em; }
.ty-create { padding: 14px 14px 10px; }
.ty-create input[type="text"] {
max-width: 100%;
box-sizing: border-box;
}
/* 磁贴:小屏两列 */
.ty-tiles {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 5px;
}
.ty-tile { padding: 13px 12px 11px; }
.ty-tile-name { font-size: .92em; }
.ty-tile-meta { font-size: .74em; }
.ty-dir-head { padding: 8px 12px; gap: 8px; }
.ty-dir-en { display: none; } /* 小屏隐藏英文小字,避免挤压 */
/* 正文排版 */
.mw-parser-output { line-height: 1.7; }
.mw-parser-output h2 { margin-top: 1.3em; }
/* 表格横向滚动,不撑破版面 */
.mw-parser-output table.wikitable,
.mw-parser-output table.infobox {
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
max-width: 100%;
}
/* 代码块 / 预格式文本可横向滚动 */
.mw-parser-output pre,
.mw-parser-output .mw-code {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
white-space: pre;
max-width: 100%;
box-sizing: border-box;
}
/* 图片不超出屏宽 */
.mw-parser-output img { max-width: 100%; height: auto; }
.mw-parser-output div.thumbinner {
max-width: 100%;
box-sizing: border-box;
}
.mw-parser-output div.floatright,
.mw-parser-output div.floatleft {
margin-left: 0;
margin-right: 0;
}
}
/* 更小的手机(≤420px):磁贴保持两列但更紧凑 */
@media (max-width: 420px) {
.ty-tiles { grid-template-columns: repeat(2, 1fr); }
.ty-step { padding: 10px 12px; }
}
/* 可视化编辑器:点选图片时浮出的「换行」按钮 */
.ty-ve-br {
position: fixed;
z-index: 60;
display: none;
padding: 5px 12px;
background: var(--wiki-primary);
color: #fff;
border: none;
border-radius: 0;
font-size: 13px;
font-weight: 600;
font-family: inherit;
line-height: 1.4;
cursor: pointer;
box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
}
.ty-ve-br:hover {
background: var(--wiki-primary-deep);
}
/* 保存前分类引导对话框(配 Common.js) */
.ty-cg-dialog .oo-ui-processDialog-location {
min-height: 2.6em;
}
.ty-cg-tip {
margin: 0 0 10px;
line-height: 1.7;
color: #3c4a45;
}
.ty-cg-list {
border: 1px solid #d9e2dd;
background: #fff;
}
.ty-cg-group + .ty-cg-group {
border-top: 1px solid #e6ece9;
}
.ty-cg-head {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 10px 12px;
border: 0;
background: #f4f8f6;
cursor: pointer;
font-size: 14px;
font-weight: 600;
color: #1f2c27;
text-align: left;
}
.ty-cg-head:hover {
background: var(--wiki-primary-tint, #E7F1EC);
}
.ty-cg-arrow {
display: inline-block;
width: 14px;
color: var(--wiki-primary, #2E8B74);
transition: transform 0.15s;
}
.ty-cg-open .ty-cg-arrow {
transform: rotate( 90deg );
}
.ty-cg-gname {
font-weight: 700;
}
.ty-cg-ghint {
margin-left: auto;
font-size: 12px;
font-weight: 400;
color: #7d8a85;
}
.ty-cg-body {
display: none;
flex-wrap: wrap;
gap: 6px;
padding: 10px 12px 12px 34px;
}
.ty-cg-open .ty-cg-body {
display: flex;
}
.ty-cg-cat {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
border: 1px solid #cfd9d4;
background: #fafcfb;
cursor: pointer;
font-size: 13px;
line-height: 1.4;
user-select: none;
}
.ty-cg-cat:hover {
border-color: var(--wiki-primary, #2E8B74);
}
.ty-cg-cat input {
accent-color: var(--wiki-primary, #2E8B74);
margin: 0;
}
.ty-cg-cat:has( input:checked ) {
border-color: var(--wiki-primary, #2E8B74);
background: var(--wiki-primary-tint, #E7F1EC);
font-weight: 600;
}
.ty-cg-count {
margin: 10px 0 0;
font-size: 13px;
color: #5a6a64;
}
@media ( max-width: 768px ) {
.ty-cg-body {
padding: 8px 10px 10px 26px;
}
.ty-cg-cat {
padding: 5px 8px;
font-size: 12.5px;
}
}
/* ===== 移动端:可视化编辑器弹出菜单适配(2026-10-01) =====
窄屏下 OOUI 会把下拉菜单按「右缘对齐按钮」来定位,位于工具栏右侧的
菜单(页面选项、切换编辑器等)会被算出负的 left,左半部分(图标与
文字)被挤出屏幕。这里把弹层改为与工具栏同宽、整栏展开。 */
@media ( max-width: 768px ) {
.ve-ui-toolbar .oo-ui-toolbar-popups.oo-ui-toolbar-narrow {
left: 0 !important;
right: 0 !important;
}
.ve-ui-toolbar .oo-ui-toolbar-popups.oo-ui-toolbar-narrow > .oo-ui-toolGroup-tools {
left: 0 !important;
right: 0 !important;
top: 0 !important;
width: auto !important;
margin-left: 0 !important;
max-width: none !important;
box-sizing: border-box;
max-height: calc( 100vh - 190px ) !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch;
}
}
/* 分类引导框:确保位于 VE 各浮层之上 */
.ty-cg-wm {
position: relative;
z-index: 500;
}