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

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

来自卡车模拟中文维基
无编辑摘要
标签已被回退
撤销Imxiaoanag讨论)的修订版本121
标签撤销
 
第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);
background-color: var(--infobox-background-color);
    border-radius: 8px;
color: var(--infobox-text-color);
    box-shadow: var(--box-shadow-drop-medium);
 
    margin: 0;
border: 1px solid var(--infobox-border-color);
    padding: 0;
border-radius: 8px;
    font-size: 0.875rem;
box-shadow: var(--infobox-shadow);
    overflow: hidden;
 
    float: right;
margin: 0 0 0 16px;
    margin-left: 16px;
padding: 0;
 
font-size: 0.875rem;
 
overflow: hidden;
float: right;
}
}
/* =========================================================
* Infobox 对齐方式
* ========================================================= */


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


.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: 16px;
    margin-left: auto;
margin-right: 0;
    float: right;
float: right;
    margin-left: 16px;
}
}
/* =========================================================
* Infobox 标题区域
* ========================================================= */


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


padding: 16px;
.infobox-logo {
 
    margin-left: 8px;
border-bottom: 1px solid var(--infobox-border-color);
    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 {
margin: 0;
    font-size: 1.4rem;
 
    margin: 0;
color: var(--infobox-title-color);
    color: var(--color-emphasized);
 
    font-weight: bold;
font-size: 1.4rem;
font-weight: bold;
}
}


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


.infobox-columns .value {
.infobox-columns .value {
color: var(--infobox-text-color);
    font-weight: 600;
 
    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 {
display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}


max-width: 100%;
@media (max-width: 720px) {
height: auto;
    .infobox {
 
        width: 95%;
object-fit: cover;
        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:55的最新版本

.infobox {
    max-width: 400px;
    background: var(--color-surface-2);
    border-radius: 8px;
    box-shadow: var(--box-shadow-drop-medium);
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    overflow: hidden;
    float: right;
    margin-left: 16px;
}

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

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

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

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

.infobox-logo {
    margin-left: 8px;
    align-self: center;
}

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

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

.infobox-subtitle {
    font-size: 0.9em;
    color: var(--color-subtle);
    margin: 0;
}

.infobox-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-base);
}

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

.columns-1 { grid-template-columns: repeat(1, 1fr); }
.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-3 { grid-template-columns: repeat(3, 1fr); }

.infobox-columns .label {
    font-size: 0.8125rem;
    color: var(--color-subtle);
    margin-bottom: 2px;
}

.infobox-columns .value {
    font-weight: 600;
    word-break: break-word;
}

.tabber.infobox-tabber {
    border-radius: 8px 8px 0 0;
}

.tabber .tabbertab {
    padding: 0;
}

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

.infobox-image img {
    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 {
    justify-content: space-between;
}

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

.infobox-logo {
    margin-left: 0;
    align-self: center;
}