Module:Infobox/styles.css:修订间差异
来自卡车模拟中文维基
更多操作
Imxiaoanag(留言 | 贡献) Ported from TSW Wiki CN |
Imxiaoanag(留言 | 贡献) 小无编辑摘要 标签:已被回退 |
||
| 第1行: | 第1行: | ||
/* ========================================================= | |||
* Infobox 主题变量 | |||
* ========================================================= */ | |||
:root { | |||
/* 浅色模式 */ | |||
--infobox-background-color: var(--color-surface-2); | |||
--infobox-border-color: var(--border-color-base); | |||
--infobox-text-color: var(--color-base); | |||
--infobox-title-color: var(--color-emphasized); | |||
--infobox-subtle-color: var(--color-subtle); | |||
--infobox-shadow: var(--box-shadow-drop-medium); | |||
} | |||
/* | |||
* Citizen 夜间模式。 | |||
* | |||
* 页面底色为 #333333 时,让 Infobox 使用稍亮的灰色, | |||
* 以便与页面背景形成清晰层次。 | |||
*/ | |||
:root.skin-theme-clientpref-night { | |||
--infobox-background-color: #3d3d3d; | |||
--infobox-border-color: #555555; | |||
--infobox-text-color: #f1f1f1; | |||
--infobox-title-color: #ffffff; | |||
--infobox-subtle-color: #b8b8b8; | |||
--infobox-shadow: | |||
0 2px 8px rgb(0 0 0 / 0.35), | |||
0 8px 24px rgb(0 0 0 / 0.2); | |||
} | |||
/* ========================================================= | |||
* Infobox 主体 | |||
* ========================================================= */ | |||
.infobox { | .infobox { | ||
max-width: 400px; | |||
background-color: var(--infobox-background-color); | |||
color: var(--infobox-text-color); | |||
border: 1px solid var(--infobox-border-color); | |||
border-radius: 8px; | |||
box-shadow: var(--infobox-shadow); | |||
margin: 0 0 0 16px; | |||
padding: 0; | |||
font-size: 0.875rem; | |||
overflow: hidden; | |||
float: right; | |||
} | } | ||
/* ========================================================= | |||
* Infobox 对齐方式 | |||
* ========================================================= */ | |||
.infobox-align-left { | .infobox-align-left { | ||
margin-left: 0; | |||
margin-right: 16px; | |||
float: left; | |||
} | } | ||
.infobox-align-center { | .infobox-align-center { | ||
margin-left: auto; | |||
margin-right: auto; | |||
float: none; | |||
} | } | ||
.infobox-align-right { | .infobox-align-right { | ||
margin-left: 16px; | |||
margin-right: 0; | |||
float: right; | |||
} | } | ||
/* ========================================================= | |||
* Infobox 标题区域 | |||
* ========================================================= */ | |||
.infobox-header { | .infobox-header { | ||
display: flex; | |||
align-items: center; | |||
padding: 16px; | |||
border-bottom: 1px solid var(--infobox-border-color); | |||
} | } | ||
.infobox-title-and-subtitle { | .infobox-title-and-subtitle { | ||
display: flex; | |||
flex-direction: column; | |||
} | } | ||
.infobox-title { | .infobox-title { | ||
margin: 0; | |||
color: var(--infobox-title-color); | |||
font-size: 1.4rem; | |||
font-weight: bold; | |||
} | } | ||
.infobox-subtitle { | .infobox-subtitle { | ||
margin: 0; | |||
color: var(--infobox-subtle-color); | |||
font-size: 0.9em; | |||
} | |||
.infobox-logo { | |||
margin-left: 0; | |||
align-self: center; | |||
} | } | ||
/* ========================================================= | |||
* Infobox 内容区块 | |||
* ========================================================= */ | |||
.infobox-section { | .infobox-section { | ||
padding: 12px 16px; | |||
border-bottom: 1px solid var(--infobox-border-color); | |||
} | |||
/* | |||
* 移除最后一个区块底部多余的分隔线。 | |||
*/ | |||
.infobox-section:last-child { | |||
border-bottom: 0; | |||
} | } | ||
/* ========================================================= | |||
* Infobox 栏目布局 | |||
* ========================================================= */ | |||
.infobox-columns { | .infobox-columns { | ||
display: grid; | |||
gap: 12px; | |||
} | } | ||
.columns-1 { grid-template-columns: | .columns-1 { | ||
.columns-2 { grid-template-columns: repeat(2, 1fr); } | grid-template-columns: 1fr; | ||
.columns-3 { grid-template-columns: repeat(3, 1fr); } | } | ||
.columns-2 { | |||
grid-template-columns: repeat(2, minmax(0, 1fr)); | |||
} | |||
.columns-3 { | |||
grid-template-columns: repeat(3, minmax(0, 1fr)); | |||
} | |||
.infobox-columns .label { | .infobox-columns .label { | ||
margin-bottom: 2px; | |||
color: var(--infobox-subtle-color); | |||
font-size: 0.8125rem; | |||
} | } | ||
.infobox-columns .value { | .infobox-columns .value { | ||
color: var(--infobox-text-color); | |||
font-weight: 600; | |||
word-break: break-word; | |||
} | } | ||
/* ========================================================= | |||
* Tabber 适配 | |||
* ========================================================= */ | |||
.tabber.infobox-tabber { | .tabber.infobox-tabber { | ||
border-radius: 8px 8px 0 0; | |||
overflow: hidden; | |||
} | |||
.tabber.infobox-tabber, | |||
.tabber.infobox-tabber .tabbertab { | |||
background-color: var(--infobox-background-color); | |||
color: var(--infobox-text-color); | |||
} | } | ||
.tabber .tabbertab { | .tabber .tabbertab { | ||
padding: 0; | |||
} | } | ||
/* ========================================================= | |||
* Infobox 图片 | |||
* ========================================================= */ | |||
.infobox-image { | .infobox-image { | ||
text-align: center; | |||
line-height: 0; | |||
} | } | ||
.infobox-image img { | .infobox-image img { | ||
display: block; | |||
max-width: 100%; | |||
height: auto; | |||
object-fit: cover; | |||
} | } | ||
/* ========================================================= | |||
* 标题排列样式 | |||
* ========================================================= */ | |||
.title-style-left { | .title-style-left { | ||
justify-content: space-between; | |||
} | } | ||
.title-style-center { | .title-style-center { | ||
justify-content: center; | |||
gap: 16px; | |||
flex-direction: row-reverse; | |||
} | } | ||
.infobox- | /* ========================================================= | ||
* 移动端适配 | |||
* ========================================================= */ | |||
@media (max-width: 720px) { | |||
.infobox, | |||
.infobox-align-left, | |||
.infobox-align-center, | |||
.infobox-align-right { | |||
width: 95%; | |||
max-width: none; | |||
margin: 1rem auto; | |||
float: none; | |||
} | |||
.columns-2, | |||
.columns-3 { | |||
grid-template-columns: 1fr; | |||
} | |||
} | } | ||
2026年7月21日 (二) 02:50的版本
/* =========================================================
* Infobox 主题变量
* ========================================================= */
:root {
/* 浅色模式 */
--infobox-background-color: var(--color-surface-2);
--infobox-border-color: var(--border-color-base);
--infobox-text-color: var(--color-base);
--infobox-title-color: var(--color-emphasized);
--infobox-subtle-color: var(--color-subtle);
--infobox-shadow: var(--box-shadow-drop-medium);
}
/*
* Citizen 夜间模式。
*
* 页面底色为 #333333 时,让 Infobox 使用稍亮的灰色,
* 以便与页面背景形成清晰层次。
*/
:root.skin-theme-clientpref-night {
--infobox-background-color: #3d3d3d;
--infobox-border-color: #555555;
--infobox-text-color: #f1f1f1;
--infobox-title-color: #ffffff;
--infobox-subtle-color: #b8b8b8;
--infobox-shadow:
0 2px 8px rgb(0 0 0 / 0.35),
0 8px 24px rgb(0 0 0 / 0.2);
}
/* =========================================================
* Infobox 主体
* ========================================================= */
.infobox {
max-width: 400px;
background-color: var(--infobox-background-color);
color: var(--infobox-text-color);
border: 1px solid var(--infobox-border-color);
border-radius: 8px;
box-shadow: var(--infobox-shadow);
margin: 0 0 0 16px;
padding: 0;
font-size: 0.875rem;
overflow: hidden;
float: right;
}
/* =========================================================
* Infobox 对齐方式
* ========================================================= */
.infobox-align-left {
margin-left: 0;
margin-right: 16px;
float: left;
}
.infobox-align-center {
margin-left: auto;
margin-right: auto;
float: none;
}
.infobox-align-right {
margin-left: 16px;
margin-right: 0;
float: right;
}
/* =========================================================
* Infobox 标题区域
* ========================================================= */
.infobox-header {
display: flex;
align-items: center;
padding: 16px;
border-bottom: 1px solid var(--infobox-border-color);
}
.infobox-title-and-subtitle {
display: flex;
flex-direction: column;
}
.infobox-title {
margin: 0;
color: var(--infobox-title-color);
font-size: 1.4rem;
font-weight: bold;
}
.infobox-subtitle {
margin: 0;
color: var(--infobox-subtle-color);
font-size: 0.9em;
}
.infobox-logo {
margin-left: 0;
align-self: center;
}
/* =========================================================
* Infobox 内容区块
* ========================================================= */
.infobox-section {
padding: 12px 16px;
border-bottom: 1px solid var(--infobox-border-color);
}
/*
* 移除最后一个区块底部多余的分隔线。
*/
.infobox-section:last-child {
border-bottom: 0;
}
/* =========================================================
* Infobox 栏目布局
* ========================================================= */
.infobox-columns {
display: grid;
gap: 12px;
}
.columns-1 {
grid-template-columns: 1fr;
}
.columns-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.columns-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.infobox-columns .label {
margin-bottom: 2px;
color: var(--infobox-subtle-color);
font-size: 0.8125rem;
}
.infobox-columns .value {
color: var(--infobox-text-color);
font-weight: 600;
word-break: break-word;
}
/* =========================================================
* Tabber 适配
* ========================================================= */
.tabber.infobox-tabber {
border-radius: 8px 8px 0 0;
overflow: hidden;
}
.tabber.infobox-tabber,
.tabber.infobox-tabber .tabbertab {
background-color: var(--infobox-background-color);
color: var(--infobox-text-color);
}
.tabber .tabbertab {
padding: 0;
}
/* =========================================================
* Infobox 图片
* ========================================================= */
.infobox-image {
text-align: center;
line-height: 0;
}
.infobox-image img {
display: block;
max-width: 100%;
height: auto;
object-fit: cover;
}
/* =========================================================
* 标题排列样式
* ========================================================= */
.title-style-left {
justify-content: space-between;
}
.title-style-center {
justify-content: center;
gap: 16px;
flex-direction: row-reverse;
}
/* =========================================================
* 移动端适配
* ========================================================= */
@media (max-width: 720px) {
.infobox,
.infobox-align-left,
.infobox-align-center,
.infobox-align-right {
width: 95%;
max-width: none;
margin: 1rem auto;
float: none;
}
.columns-2,
.columns-3 {
grid-template-columns: 1fr;
}
}