MediaWiki:Common.css
来自天龙知识库
跳到导航跳到搜索
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* ============================================================================
TLBB Lua 接口知识库 —— 站点样式
发布目标:MediaWiki:Common.css(对全部皮肤生效)
维护:H:/TLBB/.codex_tmp/build-server-lua-wiki.cjs 与 build-client-lua-wiki.cjs
生成的页面只写 class,正文里不再出现 style="..."。
为什么必须外置:MediaWiki 内置搜索(本站没有 CirrusSearch)生成结果摘要时
直接截取页面的原始 wikitext,内联样式会被整段显示在摘要里;外置前内联样式
占 2841 个页面正文的 56.2%。
改这份文件前先确认没有页面还在用被删掉的 class:
H:/TLBB/.codex_tmp/stat-common-css-usage.cjs 可列出当前实际用到的 class。
========================================================================== */
.lua-reference {
max-width: 1200px;
margin: 0 auto;
line-height: 1.8;
color: #29343a;
font-family: Arial, 'Microsoft YaHei', 'PingFang SC', sans-serif;
letter-spacing: 0;
overflow-wrap: anywhere;
}
/* ---- 标题层级 ---- */
.lua-title { font-size: 25px; font-weight: bold; color: #193d37; }
.lua-h1 { font-size: 22px; font-weight: bold; color: #193d37; }
.lua-sub { margin-top: 6px; color: #657078; }
.lua-sub-lg { margin-top: 10px; color: #657078; }
/* ---- 导语与分隔线 ---- */
.lua-lead { padding: 14px 0; border-top: 3px solid #287568; }
.lua-rule { border-bottom: 1px solid #dbe3e6; }
.lua-index-head { padding: 18px 0; border-top: 4px solid #287568; border-bottom: 1px solid #dbe3e6; }
.lua-lead.lua-accent-red { border-top-color: #a36761; }
.lua-lead.lua-accent-teal { border-top-color: #597c66; }
.lua-lead.lua-accent-amber { border-top-color: #7c6a59; }
/* ---- 次要文字 ---- */
.lua-muted { color: #657078; }
.lua-warn { color: #a08a6a; }
.lua-note {
margin-top: 20px;
padding-top: 10px;
border-top: 1px solid #dbe3e6;
color: #657078;
font-size: 12px;
}
/* ---- 代码:用元素选择器,页面里连 class 都不用写 ---- */
.lua-reference code {
white-space: normal;
overflow-wrap: anywhere;
}
.lua-reference pre {
white-space: pre-wrap;
overflow-wrap: anywhere;
font-size: 13px;
line-height: 1.7;
padding: 12px;
background: #f5f7f8;
border: 1px solid #dbe3e6;
}
/* ---- 表格 ---- */
.lua-reference table.wikitable {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
font-size: 13px;
}
.lua-reference table.wikitable th {
text-align: left;
background: #edf3f2;
padding: 8px;
vertical-align: top;
overflow-wrap: anywhere;
}
.lua-reference table.wikitable td {
padding: 8px;
vertical-align: top;
overflow-wrap: anywhere;
}
/* ---- 表格列宽
build 侧只允许下表登记过的宽度(.codex_tmp 里的 WIDTHS 常量),
出现新宽度会直接抛错,避免页面写了 class 却没有对应规则。 ---- */
.lua-reference .lua-w9 { width: 9%; }
.lua-reference .lua-w10 { width: 10%; }
.lua-reference .lua-w11 { width: 11%; }
.lua-reference .lua-w18 { width: 18%; }
.lua-reference .lua-w22 { width: 22%; }
.lua-reference .lua-w25 { width: 25%; }
.lua-reference .lua-w26 { width: 26%; }
.lua-reference .lua-w36 { width: 36%; }
.lua-reference .lua-w38 { width: 38%; }
.lua-reference .lua-w42 { width: 42%; }
.lua-reference .lua-w44 { width: 44%; }
.lua-reference .lua-w46 { width: 46%; }
.lua-reference .lua-w60 { width: 60%; }