Minecraft Wiki/styles.css:修订间差异
更多操作
创建页面,内容为“→========================================================= Minecraft Wiki 首页样式 适配 Vector (wgl) 与 Citizen 皮肤 依赖 MediaWiki:Common.css 中的 CSS 变量 =========================================================: →--------------------------------------------------------- 整体布局 ---------------------------------------------------------: .mp-wrapper { box-sizing: border-box; } .mp-inline-sections { displ…” |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* | /* OUTREX Wiki 首页样式 | ||
完全复刻 zh.minecraft.wiki 布局 | |||
适配 | 适配 Citizen 皮肤 + 暗色模式 | ||
*/ | |||
/* | /* ── 全局盒模型 ── */ | ||
.mp-wrapper *, .mp-wrapper *::before, .mp-wrapper *::after { | |||
.mp-wrapper { | |||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
.mp- | .mp-wrapper { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: | width: 100%; | ||
gap: 6px; | |||
} | |||
/* ── 两栏网格 ── */ | |||
.mp-inline-sections { | |||
display: grid; | |||
grid-template-columns: 1fr; | |||
grid-template-areas: "site" "left" "right"; | |||
gap: 6px; | |||
width: 100%; | |||
} | } | ||
.mp-left { | #mp-section-site { grid-area: site; } | ||
.mp-left { grid-area: left; } | |||
.mp-right { grid-area: right; } | |||
@media screen and (min-width: 990px) { | |||
.mp-inline-sections { | |||
grid-template-columns: 2fr 1fr; | |||
grid-template-rows: auto 1fr; | |||
grid-template-areas: "left site" "left right"; | |||
} | |||
} | |||
.mp-left, .mp-right { | |||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
gap: | gap: 6px; | ||
} | } | ||
.mp-right { | .mp-right > :last-child { flex: 1; } | ||
.mp-sticky { | |||
position: sticky; | |||
top: 20px; | |||
} | |||
.skin-citizen .mp-sticky { | |||
top: calc(var(--citizen-header-height, 56px) + 20px); | |||
} | } | ||
/* | /* ── section 卡片 ── */ | ||
.mp-section { | .mp-section { | ||
background-color: | border: 2px solid #bbb; | ||
background-color: #fcfcfcb8; | |||
box-shadow: inset -2px -2px #0000000f, inset 2px 2px #ffffff0d; | |||
padding: 12px; | |||
} | |||
body.wgl-theme-dark .mp-section, | |||
html[data-mw-skin-citizen-theme="dark"] .mp-section { | |||
border-color: #202125; | |||
background-color: #4c4e522e; | |||
} | |||
.mp-wrapper > .mp-section { width: 100%; } | |||
.mp-section.mp-section-full { width: 100%; } | |||
.mp-section-center { text-align: center; } | |||
/* ── 标题 ── */ | |||
.mp-wrapper h2 { | |||
font-family: revert; | |||
font-weight: bold; | |||
font-size: 1.2em; | |||
} | } | ||
.mp-title { | .mp-title { | ||
border: none; | |||
margin: 0; | |||
margin: | padding: 0 !important; | ||
padding: 0 | |||
} | } | ||
/* | /* ── 更新高亮卡片 ── */ | ||
.mp-highlight-wrapper { | .mp-highlight-wrapper { | ||
display: flex; | display: flex; | ||
| 第65行: | 第92行: | ||
.mp-highlight { | .mp-highlight { | ||
flex: 1 1 0; | |||
min-width: 280px; | |||
min-height: calc(150px + 5vh); | |||
max-height: 300px; | |||
position: relative; | position: relative; | ||
padding: 0; | |||
overflow: hidden; | overflow: hidden; | ||
background-size: cover; | |||
background-position: center; | |||
background-repeat: no-repeat; | |||
background-color: #1a3a1a; | |||
box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2; | |||
color: #fff !important; | |||
font-size: small; | |||
text-shadow: 1px 1px 8px #333, -1px -1px 8px #333; | |||
} | |||
.mp-section.mp-highlight::after { | |||
position: absolute; | |||
content: ''; | |||
top: 0; bottom: 0; left: 0; right: 0; | |||
box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2; | |||
pointer-events: none; | |||
} | } | ||
.mp-highlight *:not(a):not(.sprite-text) { color: #fff !important; } | |||
.mp-highlight a { color: #bed9ff !important; } | |||
.mp-highlight .mp-title { line-height: 1.2; margin-bottom: 6px; } | |||
.mp-highlight-image { | .mp-highlight-image { | ||
position: absolute; | position: absolute; | ||
inset: 0; | inset: 0; | ||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.mp-highlight-image img { | .mp-highlight-image img { | ||
object-fit: cover; | |||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
max-height: 300px; | |||
} | } | ||
.mp-highlight-image.mp-dark-only { display: none; } | |||
.mp- | body.wgl-theme-dark .mp-highlight-image.mp-dark-only, | ||
html[data-mw-skin-citizen-theme="dark"] .mp-highlight-image.mp-dark-only { display: block; } | |||
} | body.wgl-theme-dark .mp-highlight-image.mp-light-only, | ||
.mp-dark-only { | html[data-mw-skin-citizen-theme="dark"] .mp-highlight-image.mp-light-only { display: none; } | ||
} | |||
.mp-highlight-top-description { | |||
background: linear-gradient(180deg, #0008 24px, transparent); | |||
padding: 12px; | |||
position: absolute; | |||
top: 0; width: 100%; | |||
} | } | ||
.mp-highlight- | .mp-highlight-bottom-description { | ||
background: linear-gradient(to top, #0008 50%, transparent); | |||
padding: 0 12px 10px; | |||
position: absolute; | |||
bottom: 0; width: 100%; | |||
} | } | ||
.mp-highlight- | .mp-highlight-version { font-size: 0.95rem; font-weight: bold; } | ||
} | |||
.mp- | /* ── 按钮变量 ── */ | ||
color: # | .mp-wrapper { | ||
--button-color: #ebebeb; | |||
--button-color-progressive: #3a971e; | |||
--button-text-color: var(--color-base); | |||
--button-border-color: rgba(0,0,0,0.4); | |||
} | } | ||
.mp- | body.wgl-theme-dark .mp-wrapper, | ||
color: | html[data-mw-skin-citizen-theme="dark"] .mp-wrapper { | ||
--button-color: #48494a; | |||
--button-color-progressive: #137342; | |||
--button-text-color: #fff; | |||
--button-border-color: #242424; | |||
} | } | ||
.mp- | /* ── 按钮 ── */ | ||
.mp-button { | |||
width: 100%; | |||
gap: 6px; | |||
cursor: pointer; | |||
position: relative; | position: relative; | ||
text-align: center; | |||
background-color: var(--button-color); | |||
color: var(--button-text-color, #000); | |||
border: 2px solid var(--button-border-color); | |||
font- | font-size: 1em; | ||
font-weight: bold; | |||
transition-property: background-color, color, border-color, box-shadow, opacity, padding, margin; | |||
transition-duration: .1s; | |||
} | } | ||
.mp- | .mp-button.mp-button-progressive { | ||
background-color: var(--button-color-progressive); | |||
color: #fff; | --button-text-color: #fff; | ||
--button-text-shadow-color: #00000020; | |||
} | } | ||
body.mediawiki .mp-button > * { | |||
width: calc(100% + 4px); | |||
height: calc(100% + 4px); | |||
margin: -2px; | |||
color: var(--button-text-color, #000) !important; | |||
text-decoration: none; | |||
text-shadow: 2px 2px 0 var(--button-text-shadow-color, transparent); | |||
display: flex; | display: flex; | ||
gap: 6px; | gap: 6px; | ||
padding: 8px 10px 14px !important; | |||
text-align: center; | |||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
transition-property: padding, margin; | |||
transition-duration: .1s; | |||
} | } | ||
.mp-button | body.wgl-theme-dark .mp-button > *, | ||
html[data-mw-skin-citizen-theme="dark"] .mp-button > * { | |||
--color-base: #fff; | |||
} | } | ||
.mp-button: | .mp-button::after { | ||
display: block; | |||
content: ''; | |||
position: absolute; | |||
top: 0; left: 0; | |||
width: 100%; height: 100%; | |||
z-index: 1; | |||
box-shadow: 0 -6px 0 0 rgb(104,104,104) inset, | |||
2px 2px 0 0 rgba(178,178,178,0.5) inset, | |||
-2px -8px 0 0 rgba(153,153,153,0.5) inset; | |||
mix-blend-mode: hard-light; | |||
transition: .1s background-color, box-shadow; | |||
pointer-events: none; | |||
} | } | ||
.mp-button:not(.mp-portal-active):active::after { | |||
.mp-button | box-shadow: 2px 2px 0 0 rgba(178,178,178,0.5) inset, | ||
-2px -2px 0 0 rgba(153,153,153,0.5) inset; | |||
background-color: #0000001a; | |||
color: | |||
} | } | ||
.mp-button- | .mp-button:not(.mp-portal-active):hover:not(:active)::after { | ||
background-color: #ffffff1a; | |||
} | } | ||
.mp-button | body.mediawiki .mp-button:active > * { | ||
padding: 14px 10px 8px !important; | |||
margin-top: -8px; | |||
height: calc(100% + 10px); | |||
} | } | ||
.mp-button:not(.mp-icon-link):active { margin-top: 6px; } | |||
.mp-button | |||
} | |||
.mp-button- | /* ── 按钮组 ── */ | ||
.mp-button-wrapper { | |||
display: flex; | |||
flex-direction: row; | |||
flex-wrap: wrap; | |||
gap: 4px; | |||
} | } | ||
. | .mp-button-wrapper .mp-button { | ||
flex: 1 0 0; | |||
min-width: max-content; | |||
white-space: nowrap; | |||
} | } | ||
. | /* ── 折叠按钮 ── */ | ||
content: " | .mp-button.mp-button-collapsetoggle > ::after { | ||
clip-path: polygon(0% 0%, 0% 25%, 14.286% 25%, 14.286% 50%, 28.572% 50%, 28.572% 75%, 42.858% 75%, 42.858% 100%, 57.142% 100%, 57.142% 75%, 71.428% 75%, 71.428% 50%, 85.714% 50%, 85.714% 25%, 100% 25%, 100% 0%, 85.714% 0%, 85.714% 25%, 71.428% 25%, 71.428% 50%, 57.142% 50%, 57.142% 75%, 42.858% 75%, 42.858% 50%, 28.572% 50%, 28.572% 25%, 14.286% 25%, 14.286% 0%); | |||
display: block; | |||
content: ""; | |||
width: 15px; height: 9px; | |||
background-color: var(--color-base); | |||
transform: rotate(180deg); | |||
transition: 300ms transform; | |||
pointer-events: none; | |||
margin-left: auto; | |||
} | } | ||
.collapsed . | .collapsible.collapsed .mp-button.mp-button-collapsetoggle > ::after { | ||
transform: rotate(0); | |||
} | } | ||
body.mediawiki .collapsible .mp-button.mp-button-collapsetoggle > h4, | |||
.mp-button- | body.mediawiki .collapsible .mp-button.mp-button-collapsetoggle:active > h4 { | ||
padding-left: 12px !important; | |||
padding-right: 12px !important; | |||
} | } | ||
.mp-button .collapsetoggle-custom { | |||
position: absolute; | |||
left: 0; right: 0; top: 0; bottom: 0; | |||
.mp- | color: transparent !important; | ||
--button-text-color: transparent; | |||
user-select: none; | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
} | } | ||
.mp- | html.client-js .mp-wrapper .collapsible-content { | ||
display: grid; | |||
grid-template-rows: 1fr; | |||
transition: grid-template-rows 300ms, visibility 300ms; | |||
} | } | ||
.mp- | html.client-js .mp-wrapper .collapsible-content > * { overflow: hidden; } | ||
} | |||
.mp- | html.client-js .mp-wrapper .collapsible.collapsed .collapsible-content { | ||
display: grid; | |||
grid-template-rows: 0fr; | |||
visibility: hidden; | |||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
.mp- | html.client-js .mp-wrapper .collapsible.collapsed .collapsible-content > .mp-section { | ||
padding: 0; | |||
transition: padding 200ms; | |||
} | } | ||
.mp- | /* ── 社交按钮 ── */ | ||
.mp-social-wrapper { | |||
display: grid; | |||
grid-auto-columns: minmax(0, 1fr); | |||
grid-auto-flow: column; | |||
gap: 4px; | |||
width: 100%; | |||
} | } | ||
.mp-social-wrapper img { margin: 2px 0; } | |||
.mp-button.mp-social-qq { background-color: #1ebafc; --button-text-color: #fff; } | |||
.mp-button.mp-social-kook { background-color: #5865f2; --button-text-color: #fff; } | |||
.mp-button.mp-social-web { background-color: #3a971e; --button-text-color: #fff; } | |||
/* ── 图标网格 ── */ | |||
.mp-icon-wrapper { | .mp-icon-wrapper { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: | justify-content: center; | ||
gap: 8px; | |||
margin: auto; | |||
--icon-base-width: 90px; | |||
--icon-max-width: 200px; | |||
} | |||
.mp-icon { | |||
flex: 1 auto; | |||
width: var(--icon-base-width); | |||
max-width: var(--icon-max-width); | |||
display: flex; | |||
flex-direction: column; | |||
transition-property: padding, margin; | |||
transition-duration: .1s; | |||
} | |||
@media screen and (min-width: 1500px) and (max-width: 2600px) { | |||
.mp-main-icons { --icon-base-width: 6vw; } | |||
} | |||
@media screen and (max-width: 950px) { | |||
.mp-icon-wrapper.mp-main-icons { | |||
--icon-base-width: 70px; | |||
--icon-max-width: 100px; | |||
} | |||
} | } | ||
.mp- | .mp-icon-link { | ||
-- | flex: 1; | ||
margin: -2px 0 0; | |||
font-size: 14px; | |||
padding-left: 2px; | |||
padding-right: 2px; | |||
} | } | ||
.mp-icon { | .mp-icon-img { | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: | justify-content: center; | ||
background-color: #00000030; | |||
box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff40; | |||
border: 2px solid rgba(0,0,0,0.4); | |||
transition-property: background-color, color, border-color, box-shadow, opacity, padding, margin; | |||
transition-duration: .1s; | |||
} | } | ||
.mp-icon | body.wgl-theme-dark .mp-icon-img, | ||
html[data-mw-skin-citizen-theme="dark"] .mp-icon-img { | |||
background-color: #ffffff10; | |||
color: | border-color: #242424; | ||
box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff20; | |||
} | } | ||
.mp-icon- | .mp-icon:hover .mp-icon-img { background-color: #00000040; } | ||
body.wgl-theme-dark .mp-icon:hover .mp-icon-img, | |||
height: | html[data-mw-skin-citizen-theme="dark"] .mp-icon:hover .mp-icon-img { background-color: #ffffff20; } | ||
.mp-icon-img a { padding: 12px; } | |||
.mp-icon-img a, .mp-icon-img span { | |||
display: block; | |||
width: 100%; height: 100%; | |||
text-align: center; | |||
} | } | ||
.mp-icon- | .mp-icon-img img { | ||
width: | max-width: unset !important; | ||
height: | width: 60px !important; | ||
height: 60px !important; | |||
filter: drop-shadow(2px 2px 1px #00000030); | |||
object-fit: contain; | object-fit: contain; | ||
} | } | ||
.mp-icon- | body.mediawiki .mp-icon:active .mp-icon-img { padding-bottom: 6px; } | ||
body.mediawiki .mp-icon:active .mp-button > * { | |||
padding: 14px 10px 8px !important; | |||
margin-top: -8px; | |||
height: calc(100% + 10px); | |||
} | } | ||
@media screen and (max-width: 950px) { | |||
.mp-icon-link { font-size: 12px; } | |||
.mp-icon-img a { padding: 6px; } | |||
.mp-icon-img img { width: 40px !important; height: 40px !important; } | |||
} | } | ||
/* ── site 区(右栏顶部) ── */ | |||
#mp-section-site { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 8px; | |||
align-items: center; | |||
} | } | ||
#mp-section-site #mp-statistics { text-align: center; } | |||
/* | /* ── 时间线 ── */ | ||
.mp-timeline { | .mp-timeline { | ||
display: flex; | |||
flex-direction: column; | |||
margin-left: 10px; | |||
} | } | ||
.mp-timeline dl { | .mp-timeline dl { | ||
padding-left: 15px; | |||
border-left: 2px solid #bbb; | |||
display: flex; | |||
gap: 0 .5em; | |||
flex-wrap: wrap; | |||
flex: 1; | |||
align-content: center; | |||
max-height: 60px; | |||
} | } | ||
.mp-timeline | .mp-timeline dl:not(:last-child) { padding-bottom: 8px; } | ||
.mp-timeline dt { position: relative; } | |||
} | |||
.mp-timeline dt: | .mp-timeline dl > dt::before { | ||
content: ""; | |||
position: absolute; | |||
left: -23px; top: 4px; | |||
width: 14px; height: 14px; | |||
background-color: var(--button-color-progressive); | |||
border: 2px solid var(--color-base); | |||
} | } | ||
.mp-timeline dd { | .mp-timeline dl, .mp-timeline dt, .mp-timeline dd { margin: 0; position: relative; } | ||
.mp-timeline dd { opacity: 0.8; } | |||
.mp-timeline dd:before { content: "– "; } | |||
} | |||
/* | /* ── 精选条目 ── */ | ||
.mp-featured-img { margin: auto; } | |||
.mp-featured-img img { max-width: 100%; height: auto; margin-top: 5px; } | |||
.mp- | |||
} | |||
.mp- | /* ── 平台版本 ── */ | ||
.mp-platform-wrapper { | |||
display: flex; | |||
flex-wrap: wrap; | |||
justify-content: center; | |||
gap: 6px; | |||
margin-top: 5px; | |||
} | } | ||
.mp- | .mp-platform { | ||
min-width: 300px; | |||
display: flex; | |||
gap: 5px; | |||
flex-direction: row; | |||
align-items: center; | |||
} | } | ||
/* | /* ── 语言 ── */ | ||
.mp-language-wrapper { | |||
display: flex; | |||
.mp- | flex-wrap: wrap; | ||
justify-content: center; | |||
gap: 4px; | |||
} | } | ||
.mp-language-wrapper .mp-button { flex: 1 1 90px; max-width: 180px; } | |||
/* ── sr-only ── */ | |||
.sr-only:not(:focus):not(:active) { | |||
clip-path: inset(50%); | |||
height: 1px; | |||
overflow: hidden; | |||
position: absolute; | |||
white-space: nowrap; | |||
width: 1px; | |||
} | |||
/* ── Minerva fix ── */ | |||
body.skin-minerva h1, body.skin-minerva h2, body.skin-minerva h3, | |||
body.skin-minerva h4, body.skin-minerva h5, body.skin-minerva h6, | |||
body.skin-minerva .mw-headline { | |||
flex-grow: unset; | |||
flex-basis: unset; | |||
} | } | ||
@media screen and (max-width: | /* ── 响应式 ── */ | ||
.mp- | @media screen and (max-width: 950px) { | ||
body.mediawiki .mp-portal-wrapper .mp-button:not(.mp-portal-active) > * { | |||
font-size: 0; | |||
gap: 0; | |||
} | } | ||
} | } | ||
2026年4月11日 (六) 22:34的最新版本
/* OUTREX Wiki 首页样式
完全复刻 zh.minecraft.wiki 布局 适配 Citizen 皮肤 + 暗色模式
- /
/* ── 全局盒模型 ── */ .mp-wrapper *, .mp-wrapper *::before, .mp-wrapper *::after {
box-sizing: border-box;
}
.mp-wrapper {
display: flex; flex-wrap: wrap; width: 100%; gap: 6px;
}
/* ── 两栏网格 ── */ .mp-inline-sections {
display: grid; grid-template-columns: 1fr; grid-template-areas: "site" "left" "right"; gap: 6px; width: 100%;
}
- mp-section-site { grid-area: site; }
.mp-left { grid-area: left; } .mp-right { grid-area: right; }
@media screen and (min-width: 990px) {
.mp-inline-sections {
grid-template-columns: 2fr 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: "left site" "left right";
}
}
.mp-left, .mp-right {
display: flex; flex-direction: column; gap: 6px;
}
.mp-right > :last-child { flex: 1; }
.mp-sticky {
position: sticky; top: 20px;
} .skin-citizen .mp-sticky {
top: calc(var(--citizen-header-height, 56px) + 20px);
}
/* ── section 卡片 ── */ .mp-section {
border: 2px solid #bbb; background-color: #fcfcfcb8; box-shadow: inset -2px -2px #0000000f, inset 2px 2px #ffffff0d; padding: 12px;
}
body.wgl-theme-dark .mp-section, html[data-mw-skin-citizen-theme="dark"] .mp-section {
border-color: #202125; background-color: #4c4e522e;
}
.mp-wrapper > .mp-section { width: 100%; } .mp-section.mp-section-full { width: 100%; } .mp-section-center { text-align: center; }
/* ── 标题 ── */ .mp-wrapper h2 {
font-family: revert; font-weight: bold; font-size: 1.2em;
}
.mp-title {
border: none; margin: 0; padding: 0 !important;
}
/* ── 更新高亮卡片 ── */ .mp-highlight-wrapper {
display: flex; flex-wrap: wrap; gap: 8px;
}
.mp-highlight {
flex: 1 1 0; min-width: 280px; min-height: calc(150px + 5vh); max-height: 300px; position: relative; padding: 0; overflow: hidden; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: #1a3a1a; box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2; color: #fff !important; font-size: small; text-shadow: 1px 1px 8px #333, -1px -1px 8px #333;
}
.mp-section.mp-highlight::after {
position: absolute; content: ; top: 0; bottom: 0; left: 0; right: 0; box-shadow: inset -4px -4px #0000003d, inset 4px 4px #fff2; pointer-events: none;
}
.mp-highlight *:not(a):not(.sprite-text) { color: #fff !important; } .mp-highlight a { color: #bed9ff !important; } .mp-highlight .mp-title { line-height: 1.2; margin-bottom: 6px; }
.mp-highlight-image {
position: absolute; inset: 0; overflow: hidden;
} .mp-highlight-image img {
object-fit: cover; width: 100%; height: 100%; max-height: 300px;
}
.mp-highlight-image.mp-dark-only { display: none; } body.wgl-theme-dark .mp-highlight-image.mp-dark-only, html[data-mw-skin-citizen-theme="dark"] .mp-highlight-image.mp-dark-only { display: block; } body.wgl-theme-dark .mp-highlight-image.mp-light-only, html[data-mw-skin-citizen-theme="dark"] .mp-highlight-image.mp-light-only { display: none; }
.mp-highlight-top-description {
background: linear-gradient(180deg, #0008 24px, transparent); padding: 12px; position: absolute; top: 0; width: 100%;
}
.mp-highlight-bottom-description {
background: linear-gradient(to top, #0008 50%, transparent); padding: 0 12px 10px; position: absolute; bottom: 0; width: 100%;
}
.mp-highlight-version { font-size: 0.95rem; font-weight: bold; }
/* ── 按钮变量 ── */ .mp-wrapper {
--button-color: #ebebeb; --button-color-progressive: #3a971e; --button-text-color: var(--color-base); --button-border-color: rgba(0,0,0,0.4);
}
body.wgl-theme-dark .mp-wrapper, html[data-mw-skin-citizen-theme="dark"] .mp-wrapper {
--button-color: #48494a; --button-color-progressive: #137342; --button-text-color: #fff; --button-border-color: #242424;
}
/* ── 按钮 ── */ .mp-button {
width: 100%; gap: 6px; cursor: pointer; position: relative; text-align: center; background-color: var(--button-color); color: var(--button-text-color, #000); border: 2px solid var(--button-border-color); font-size: 1em; font-weight: bold; transition-property: background-color, color, border-color, box-shadow, opacity, padding, margin; transition-duration: .1s;
}
.mp-button.mp-button-progressive {
background-color: var(--button-color-progressive); --button-text-color: #fff; --button-text-shadow-color: #00000020;
}
body.mediawiki .mp-button > * {
width: calc(100% + 4px); height: calc(100% + 4px); margin: -2px; color: var(--button-text-color, #000) !important; text-decoration: none; text-shadow: 2px 2px 0 var(--button-text-shadow-color, transparent); display: flex; gap: 6px; padding: 8px 10px 14px !important; text-align: center; align-items: center; justify-content: center; transition-property: padding, margin; transition-duration: .1s;
}
body.wgl-theme-dark .mp-button > *, html[data-mw-skin-citizen-theme="dark"] .mp-button > * {
--color-base: #fff;
}
.mp-button::after {
display: block;
content: ;
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
z-index: 1;
box-shadow: 0 -6px 0 0 rgb(104,104,104) inset,
2px 2px 0 0 rgba(178,178,178,0.5) inset,
-2px -8px 0 0 rgba(153,153,153,0.5) inset;
mix-blend-mode: hard-light;
transition: .1s background-color, box-shadow;
pointer-events: none;
}
.mp-button:not(.mp-portal-active):active::after {
box-shadow: 2px 2px 0 0 rgba(178,178,178,0.5) inset,
-2px -2px 0 0 rgba(153,153,153,0.5) inset;
background-color: #0000001a;
}
.mp-button:not(.mp-portal-active):hover:not(:active)::after {
background-color: #ffffff1a;
}
body.mediawiki .mp-button:active > * {
padding: 14px 10px 8px !important; margin-top: -8px; height: calc(100% + 10px);
}
.mp-button:not(.mp-icon-link):active { margin-top: 6px; }
/* ── 按钮组 ── */ .mp-button-wrapper {
display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px;
}
.mp-button-wrapper .mp-button {
flex: 1 0 0; min-width: max-content; white-space: nowrap;
}
/* ── 折叠按钮 ── */ .mp-button.mp-button-collapsetoggle > ::after {
clip-path: polygon(0% 0%, 0% 25%, 14.286% 25%, 14.286% 50%, 28.572% 50%, 28.572% 75%, 42.858% 75%, 42.858% 100%, 57.142% 100%, 57.142% 75%, 71.428% 75%, 71.428% 50%, 85.714% 50%, 85.714% 25%, 100% 25%, 100% 0%, 85.714% 0%, 85.714% 25%, 71.428% 25%, 71.428% 50%, 57.142% 50%, 57.142% 75%, 42.858% 75%, 42.858% 50%, 28.572% 50%, 28.572% 25%, 14.286% 25%, 14.286% 0%); display: block; content: ""; width: 15px; height: 9px; background-color: var(--color-base); transform: rotate(180deg); transition: 300ms transform; pointer-events: none; margin-left: auto;
}
.collapsible.collapsed .mp-button.mp-button-collapsetoggle > ::after {
transform: rotate(0);
}
body.mediawiki .collapsible .mp-button.mp-button-collapsetoggle > h4, body.mediawiki .collapsible .mp-button.mp-button-collapsetoggle:active > h4 {
padding-left: 12px !important; padding-right: 12px !important;
}
.mp-button .collapsetoggle-custom {
position: absolute; left: 0; right: 0; top: 0; bottom: 0; color: transparent !important; --button-text-color: transparent; user-select: none; display: flex; align-items: center;
}
html.client-js .mp-wrapper .collapsible-content {
display: grid; grid-template-rows: 1fr; transition: grid-template-rows 300ms, visibility 300ms;
}
html.client-js .mp-wrapper .collapsible-content > * { overflow: hidden; }
html.client-js .mp-wrapper .collapsible.collapsed .collapsible-content {
display: grid; grid-template-rows: 0fr; visibility: hidden; overflow: hidden;
}
html.client-js .mp-wrapper .collapsible.collapsed .collapsible-content > .mp-section {
padding: 0; transition: padding 200ms;
}
/* ── 社交按钮 ── */ .mp-social-wrapper {
display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; width: 100%;
}
.mp-social-wrapper img { margin: 2px 0; } .mp-button.mp-social-qq { background-color: #1ebafc; --button-text-color: #fff; } .mp-button.mp-social-kook { background-color: #5865f2; --button-text-color: #fff; } .mp-button.mp-social-web { background-color: #3a971e; --button-text-color: #fff; }
/* ── 图标网格 ── */ .mp-icon-wrapper {
display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: auto; --icon-base-width: 90px; --icon-max-width: 200px;
}
.mp-icon {
flex: 1 auto; width: var(--icon-base-width); max-width: var(--icon-max-width); display: flex; flex-direction: column; transition-property: padding, margin; transition-duration: .1s;
}
@media screen and (min-width: 1500px) and (max-width: 2600px) {
.mp-main-icons { --icon-base-width: 6vw; }
} @media screen and (max-width: 950px) {
.mp-icon-wrapper.mp-main-icons {
--icon-base-width: 70px;
--icon-max-width: 100px;
}
}
.mp-icon-link {
flex: 1; margin: -2px 0 0; font-size: 14px; padding-left: 2px; padding-right: 2px;
}
.mp-icon-img {
display: flex; align-items: center; justify-content: center; background-color: #00000030; box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff40; border: 2px solid rgba(0,0,0,0.4); transition-property: background-color, color, border-color, box-shadow, opacity, padding, margin; transition-duration: .1s;
}
body.wgl-theme-dark .mp-icon-img, html[data-mw-skin-citizen-theme="dark"] .mp-icon-img {
background-color: #ffffff10; border-color: #242424; box-shadow: inset 0 4px #00000030, inset 0 -4px #ffffff20;
}
.mp-icon:hover .mp-icon-img { background-color: #00000040; } body.wgl-theme-dark .mp-icon:hover .mp-icon-img, html[data-mw-skin-citizen-theme="dark"] .mp-icon:hover .mp-icon-img { background-color: #ffffff20; }
.mp-icon-img a { padding: 12px; } .mp-icon-img a, .mp-icon-img span {
display: block; width: 100%; height: 100%; text-align: center;
}
.mp-icon-img img {
max-width: unset !important; width: 60px !important; height: 60px !important; filter: drop-shadow(2px 2px 1px #00000030); object-fit: contain;
}
body.mediawiki .mp-icon:active .mp-icon-img { padding-bottom: 6px; } body.mediawiki .mp-icon:active .mp-button > * {
padding: 14px 10px 8px !important; margin-top: -8px; height: calc(100% + 10px);
}
@media screen and (max-width: 950px) {
.mp-icon-link { font-size: 12px; }
.mp-icon-img a { padding: 6px; }
.mp-icon-img img { width: 40px !important; height: 40px !important; }
}
/* ── site 区(右栏顶部) ── */
- mp-section-site {
display: flex; flex-direction: column; gap: 8px; align-items: center;
}
- mp-section-site #mp-statistics { text-align: center; }
/* ── 时间线 ── */ .mp-timeline {
display: flex; flex-direction: column; margin-left: 10px;
}
.mp-timeline dl {
padding-left: 15px; border-left: 2px solid #bbb; display: flex; gap: 0 .5em; flex-wrap: wrap; flex: 1; align-content: center; max-height: 60px;
}
.mp-timeline dl:not(:last-child) { padding-bottom: 8px; } .mp-timeline dt { position: relative; }
.mp-timeline dl > dt::before {
content: ""; position: absolute; left: -23px; top: 4px; width: 14px; height: 14px; background-color: var(--button-color-progressive); border: 2px solid var(--color-base);
}
.mp-timeline dl, .mp-timeline dt, .mp-timeline dd { margin: 0; position: relative; } .mp-timeline dd { opacity: 0.8; } .mp-timeline dd:before { content: "– "; }
/* ── 精选条目 ── */ .mp-featured-img { margin: auto; } .mp-featured-img img { max-width: 100%; height: auto; margin-top: 5px; }
/* ── 平台版本 ── */ .mp-platform-wrapper {
display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 5px;
}
.mp-platform {
min-width: 300px; display: flex; gap: 5px; flex-direction: row; align-items: center;
}
/* ── 语言 ── */ .mp-language-wrapper {
display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
}
.mp-language-wrapper .mp-button { flex: 1 1 90px; max-width: 180px; }
/* ── sr-only ── */ .sr-only:not(:focus):not(:active) {
clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px;
}
/* ── Minerva fix ── */ body.skin-minerva h1, body.skin-minerva h2, body.skin-minerva h3, body.skin-minerva h4, body.skin-minerva h5, body.skin-minerva h6, body.skin-minerva .mw-headline {
flex-grow: unset; flex-basis: unset;
}
/* ── 响应式 ── */ @media screen and (max-width: 950px) {
body.mediawiki .mp-portal-wrapper .mp-button:not(.mp-portal-active) > * {
font-size: 0;
gap: 0;
}
}