MediaWiki:Common.css

来自Mindustry中文wiki
绿豆留言 | 贡献2025年11月27日 (四) 21:55的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/* 这里放置的CSS将应用于所有皮肤 */
/* 让横幅图片自动适应手机屏幕 */
.banner img {
    width: 100% !important;
    height: auto !important;
}
/* ========== Vector 2022 终极暗黑模式 ========== */

/* 1. 覆盖核心变量 (这是最关键的一步) */
:root {
    --background-color-base: #121212 !important;       /* 网页最底层背景 */
    --background-color-container: #1e1e1e !important;  /* 文章内容区背景 */
    --background-color-interactive: #2a2a2a !important;/* 按钮/菜单背景 */
    --color-base: #e0e0e0 !important;                  /* 普通文字颜色 */
    --color-emphasized: #ffffff !important;            /* 标题文字颜色 */
    --color-subtle: #a0a0a0 !important;                /* 辅助文字颜色 */
    --border-color-base: #444 !important;              /* 边框颜色 */
    --border-color-subtle: #333 !important;            /* 浅边框 */
    --link-color: #8ab4f8 !important;                  /* 链接颜色(浅蓝) */
    --link-color-visited: #c58af9 !important;          /* 访问过的链接(浅紫) */
}

/* 2. 强制顶部导航栏变黑 */
.vector-header-container {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #333 !important;
}

/* 3. 强制左侧边栏变黑 */
.vector-main-menu-container, #mw-panel {
    background-color: #121212 !important;
}

/* 4. 强制搜索框变黑 */
.cdx-text-input__input {
    background-color: #333 !important;
    color: white !important;
    border-color: #555 !important;
}

/* 5. 让 Logo 文字变白 (如果你用的是文字Logo) */
.mw-logo-wordmark, .mw-logo-tagline {
    color: white !important;
    filter: drop-shadow(0 0 2px black); /* 加个阴影防看不清 */
}

/* 6. 修正图标颜色 (让黑色图标变成白色) */
.mw-ui-icon, .cdx-icon {
    filter: invert(1) !important;
}

/* 7. 表格修正 */
.wikitable, table {
    background-color: #2a2a2a !important;
    color: white !important;
}