打开/关闭菜单
5
6
152
卡车模拟中文维基
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Module:Infobox/styles.css:修订间差异

来自卡车模拟中文维基
Ported from TSW Wiki CN
 
无编辑摘要
标签已被回退
第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;
max-width: 400px;
    background: var(--color-surface-2);
 
    border-radius: 8px;
background-color: var(--infobox-background-color);
    box-shadow: var(--box-shadow-drop-medium);
color: var(--infobox-text-color);
    margin: 0;
 
    padding: 0;
border: 1px solid var(--infobox-border-color);
    font-size: 0.875rem;
border-radius: 8px;
    overflow: hidden;
box-shadow: var(--infobox-shadow);
    float: right;
 
    margin-left: 16px;
margin: 0 0 0 16px;
padding: 0;
 
font-size: 0.875rem;
 
overflow: hidden;
float: right;
}
}
/* =========================================================
* Infobox 对齐方式
* ========================================================= */


.infobox-align-left {
.infobox-align-left {
    margin-right: auto;
margin-left: 0;
    float: left;
margin-right: 16px;
    margin-right: 16px;
float: left;
}
}


.infobox-align-center {
.infobox-align-center {
    margin-left: auto;
margin-left: auto;
    margin-right: auto;
margin-right: auto;
    float: none;
float: none;
}
}


.infobox-align-right {
.infobox-align-right {
    margin-left: auto;
margin-left: 16px;
    float: right;
margin-right: 0;
    margin-left: 16px;
float: right;
}
}
/* =========================================================
* Infobox 标题区域
* ========================================================= */


.infobox-header {
.infobox-header {
    padding: 16px;
display: flex;
    border-bottom: 1px solid var(--border-color-base);
align-items: center;
    display: flex;
 
    align-items: center;
padding: 16px;
}


.infobox-logo {
border-bottom: 1px solid var(--infobox-border-color);
    margin-left: 8px;
    align-self: center;
}
}


.infobox-title-and-subtitle {
.infobox-title-and-subtitle {
    display: flex;
display: flex;
    flex-direction: column;
flex-direction: column;
}
}


.infobox-title {
.infobox-title {
    font-size: 1.4rem;
margin: 0;
    margin: 0;
 
    color: var(--color-emphasized);
color: var(--infobox-title-color);
    font-weight: bold;
 
font-size: 1.4rem;
font-weight: bold;
}
}


.infobox-subtitle {
.infobox-subtitle {
    font-size: 0.9em;
margin: 0;
    color: var(--color-subtle);
 
    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;
padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-base);
 
border-bottom: 1px solid var(--infobox-border-color);
}
 
/*
* 移除最后一个区块底部多余的分隔线。
*/
.infobox-section:last-child {
border-bottom: 0;
}
}
/* =========================================================
* Infobox 栏目布局
* ========================================================= */


.infobox-columns {
.infobox-columns {
    display: grid;
display: grid;
    gap: 12px;
gap: 12px;
}
}


.columns-1 { grid-template-columns: repeat(1, 1fr); }
.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 {
    font-size: 0.8125rem;
margin-bottom: 2px;
    color: var(--color-subtle);
 
    margin-bottom: 2px;
color: var(--infobox-subtle-color);
 
font-size: 0.8125rem;
}
}


.infobox-columns .value {
.infobox-columns .value {
    font-weight: 600;
color: var(--infobox-text-color);
    word-break: break-word;
 
font-weight: 600;
word-break: break-word;
}
}
/* =========================================================
* Tabber 适配
* ========================================================= */


.tabber.infobox-tabber {
.tabber.infobox-tabber {
    border-radius: 8px 8px 0 0;
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;
padding: 0;
}
}
/* =========================================================
* Infobox 图片
* ========================================================= */


.infobox-image {
.infobox-image {
    text-align: center;
text-align: center;
    line-height: 0;
line-height: 0;
}
}


.infobox-image img {
.infobox-image img {
    max-width: 100%;
display: block;
    height: auto;
 
    object-fit: cover;
max-width: 100%;
height: auto;
 
object-fit: cover;
}
}


@media (max-width: 720px) {
/* =========================================================
    .infobox {
* 标题排列样式
        width: 95%;
* ========================================================= */
        margin: 1rem auto;
        float: none;
    }
    .columns-2, .columns-3 {
        grid-template-columns: 1fr;
    }
}


.title-style-left {
.title-style-left {
    justify-content: space-between;
justify-content: space-between;
}
}


.title-style-center {
.title-style-center {
    justify-content: center;
justify-content: center;
    gap: 16px;
gap: 16px;
    flex-direction: row-reverse;
flex-direction: row-reverse;
}
}


.infobox-logo {
/* =========================================================
    margin-left: 0;
* 移动端适配
    align-self: center;
* ========================================================= */
 
@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;
	}
}