打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
秋绘君留言 | 贡献
配合首页导航修改
弃权者留言 | 贡献
无编辑摘要
 
(未显示2个用户的17个中间版本)
第1行: 第1行:
/* ==========================================================================
/* ==========================================================================
   1. 系统界面清理 (隐藏不必要的工具)
   1. 系统界面清理 & 基础修正
   ========================================================================== */
   ========================================================================== */
#ca-viewsource, #ca-history, #ca-talk {
#ca-viewsource, #ca-talk {
     display: none !important;
     display: none !important;
}
}
第17行: 第17行:


/* ==========================================================================
/* ==========================================================================
   2. 交互组件 (黑幕与选项卡)
   2. 交互组件:黑幕 (Heimu)
   ========================================================================== */
   .heimu, .heimu rt {
 
/* 黑幕:增加自适应色值与防拖选 */
.heimu, .heimu rt {
     background-color: var(--color-base, #252525);
     background-color: var(--color-base, #252525);
     color: var(--color-base, #252525);
     color: var(--color-base, #252525);
第31行: 第28行:
     color: var(--color-base, #252525);
     color: var(--color-base, #252525);
}
}
/* 悬停:背景变透明,文字恢复正常色 */
span.heimu:hover, span.heimu:active {
span.heimu:hover, span.heimu:active {
     background-color: transparent;
     background-color: transparent;
第38行: 第34行:
}
}
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
  ========================================================================== */


/* 选项卡 (Tabs):统一使用 Radio 方案,适配 Citizen 主色 */
/* ==========================================================================
.tab-container input[type="radio"] { display: none; }
  3. 现代矩形自适应导航 (核心逻辑 - 彻底净化版)
  ========================================================================== */


.tab-labels {
/* 3.1 基础显隐逻辑 */
     display: flex;
.adaptive-nav input[type="radio"] { display: none !important; }
     flex-wrap: wrap;
.nav-content {
     border-bottom: 2px solid var(--border-color-base, #ddd);
     display: none;
     overflow: hidden;
     background: var(--color-surface-2, rgba(0, 0, 0, 0.05));
    border-radius: 10px;
     margin-bottom: 10px;
     margin-bottom: 10px;
    gap: 5px;
}
}
/* 强制显示展开的内容 */
.nav-content:not(.mw-collapsed) { display: block !important; }


.tab-labels label {
/* 3.2 矩形卡片 (彻底清洗 Citizen 皮肤样式) */
     padding: 8px 20px;
.nav-text-btn.mw-customtoggle {
     all: unset !important; /* 抹除皮肤默认按钮样式 */
    position: relative;
     cursor: pointer;
     cursor: pointer;
     background: var(--color-surface-1, #f8f9fa);
     display: flex !important;
     border: 1px solid var(--border-color-base, #ddd);
    align-items: center;
     border-bottom: none;
    justify-content: flex-start;
    border-radius: 6px 6px 0 0;
    height: 64px;
    padding: 0 24px !important;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-base, #333) !important; /* 没图时文字深色 */
    border-radius: 10px;
    background-color: transparent !important; /* 默认背景透明 */
     border: 1px solid var(--border-color-base, rgba(0,0,0,0.1)) !important;
     border-bottom: 4px solid rgba(0, 0, 0, 0.15) !important;
     transition: all 0.2s ease;
     transition: all 0.2s ease;
    overflow: hidden;
    box-sizing: border-box !important;
}
}


/* 选中状态:利用 Citizen 皮肤主色 */
/* 杀死文字内部可能的任何蓝色背景 */
#tab1:checked ~ .tab-labels label[for="tab1"],
.nav-text-btn span {
#tab2:checked ~ .tab-labels label[for="tab2"],
     background: transparent !important;
#tab3:checked ~ .tab-labels label[for="tab3"] {
     padding: 0 !important;
     background: var(--color-primary, #36c);
     border: none !important;
     color: #fff;
    box-shadow: none !important;
     border-color: var(--color-primary, #36c);
     z-index: 2;
     font-weight: bold;
}
}


.tab-content {
/* 只有带 has-bg-image 类名时才显示的遮罩 */
     display: none;
.nav-text-btn.has-bg-image::before {
     padding: 20px;
     content: "";
     border: 1px solid var(--border-color-base, #ddd);
     position: absolute;
    border-top: none;
     top: 0; left: 0; width: 100%; height: 100%;
     background: var(--color-surface-0, #fff);
     background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    border-radius: 0 0 8px 8px;
     z-index: 1;
     min-height: 50px;
}
}
.nav-text-btn.has-bg-image { color: #fff !important; }
.nav-text-btn.has-bg-image span { text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
/* 3.3 交互反馈 */
.nav-text-btn:hover { border-color: var(--color-primary, #36c) !important; background-color: rgba(0,0,0,0.02) !important; }
.nav-text-btn:active { transform: translateY(2px); border-bottom-width: 1px !important; }


#tab1:checked ~ #content1,
/* 3.4 背景预留区 */
#tab2:checked ~ #content2,
.btn-bg-1, .btn-bg-2, .btn-bg-3, .btn-bg-4 { background-size: cover; background-position: center; }
#tab3:checked ~ #content3 { display: block; }


/* ==========================================================================
/* ==========================================================================
   3. 内容容器 (Navbox & InfoBox) - 适配暗色模式
   4. 自适应逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */
   ========================================================================== */
table.navbox {
@media (min-width: 769px) {
     border: 1px solid var(--border-color-base, #aaa);
     .adaptive-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
    width: 100%;
     .nav-module { display: contents; }
    margin: auto;
     .nav-text-btn { grid-row: 1; }
     font-size: 88%;
     .nav-content { grid-row: 2; grid-column: 1 / 5; margin-top: 10px; }
     background: var(--color-surface-1);
     border-collapse: collapse;
}
}
 
@media (max-width: 768px) {
.navbox-group {
     .adaptive-nav { display: block; }
     font-weight: bold;
     .nav-module { margin-bottom: 8px; }
     white-space: nowrap;
     .nav-text-btn { width: 100%; }
     padding: 0 10px;
     .nav-content { border-radius: 0 0 10px 10px; margin-top: -4px; border: 1px solid rgba(0, 0, 0, 0.1); border-top: none; }
    background: var(--color-surface-2);
}
 
.infotemplatebox {
    float: right;
    width: 280px;
     font-size: 90%;
    margin: 0 0 1em 1em;
    background: var(--color-surface-1, #f9f9f9);
    border: 1px solid var(--border-color-base, #999);
    border-collapse: collapse;
    clear: right;
}
 
.infoBoxTitle {
    background: rgba(34, 139, 34, 0.15); /* 柔和绿色背景 */
    color: var(--color-primary, #228b22);
    text-align: center;
    font-weight: bold;
    padding: 8px;
}
}
/* ==========================================================================
/* ==========================================================================
   4. 首页网格与导航系统
   4. 自适应分屏逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */
   ========================================================================== */


/* 游戏 Logo 按钮 */
/* PC端:横向排列按钮,内容横跨整行 */
.game-logo-btn {
@media (min-width: 769px) {
    cursor: pointer;
    .adaptive-nav {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: grid;
    filter: brightness(0.9);
        grid-template-columns: repeat(4, 1fr);
}
        gap: 12px;
.game-logo-btn:hover {
        margin: 20px 0;
     transform: scale(1.08);
    }
     filter: brightness(1.1);
    .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content {
        grid-row: 2;
        grid-column: 1 / 5;
        margin-top: 10px;
        border: 1px solid var(--border-color-base, rgba(255, 255, 255, 0.1));
    }
 
    #game-1:checked ~ .nav-module #content-1,
    #game-2:checked ~ .nav-module #content-2,
     #game-3:checked ~ .nav-module #content-3,
     #game-4:checked ~ .nav-module #content-4 {
        display: block;
    }
}
}


/* 移动端适配:Logo 自动缩小 */
/* 移动端:按钮堆叠,内容就地展开 */
@media (max-width: 768px) {
@media (max-width: 768px) {
     .game-logo-btn img {
     .adaptive-nav { display: block; padding: 0 5px; }
         width: 120px !important;
    .nav-module { margin-bottom: 8px; }
         height: auto !important;
    .nav-text-btn { width: 100%; }
    .nav-content {
         border-radius: 0 0 10px 10px;
        margin-top: -4px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-top: none;
    }
 
    /* 移动端特殊:由于 display: contents 失效,直接按顺序显示内容 */
    #game-1:checked ~ .nav-module:nth-of-type(1) #content-1,
    #game-2:checked ~ .nav-module:nth-of-type(2) #content-2,
    #game-3:checked ~ .nav-module:nth-of-type(3) #content-3,
    #game-4:checked ~ .nav-module:nth-of-type(4) #content-4 {
         display: block;
     }
     }
}
}


/* 首页大棋盘 */
/* ==========================================================================
  5. 首页网格与内容样式 (原本保留)
  ========================================================================== */
.home-grid {
.home-grid {
     display: grid;
     display: grid;
第158行: 第182行:
     padding: 24px;
     padding: 24px;
     transition: all 0.3s ease;
     transition: all 0.3s ease;
}
.home-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-drop, 0 8px 24px rgba(0,0,0,0.15));
    border-color: var(--color-primary);
}
}


/* 折叠内容动画 */
.nav-sub-text {
.home-game-fold summary {
     margin-top: 12px;
     list-style: none;
    font-weight: 600;
     cursor: pointer;
     font-size: 14px;
     outline: none;
     color: var(--color-base);
}
}
.home-game-fold summary::-webkit-details-marker { display: none; }


.home-game-fold[open] .fold-content {
@keyframes slideIn {  
     animation: slideDownFade 0.4s ease-out;
     from { opacity: 0; transform: translateY(-5px); }
     padding: 15px;
     to { opacity: 1; transform: translateY(0); }
    background: var(--color-surface-2);
    border-radius: 10px;
}
}


@keyframes slideDownFade {
#custom-notetip-popup {
     from { opacity: 0; transform: translateY(-15px); }
     position: absolute;
     to { opacity: 1; transform: translateY(0); }
    display: none;
}
    z-index: 10000;
 
     background: #fff;
/* 子项目文字 */
    border: 1px solid #a2a9b1;
.nav-sub-text {
     padding: 6px 10px;
     margin-top: 12px;
     box-shadow: 0 2px 4px rgba(0,0,0,0.2);
     font-weight: 600;
     font-size: 14px;
     font-size: 14px;
     color: var(--color-base);
     pointer-events: none;
    max-width: 300px;
    line-height: 1.5;
}
}

2026年5月10日 (日) 10:23的最新版本

/* ==========================================================================
   1. 系统界面清理 & 基础修正
   ========================================================================== */
#ca-viewsource, #ca-talk {
    display: none !important;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.wikitable {
    max-width: 100%;
    margin: 1em 0;
}

/* ==========================================================================
   2. 交互组件:黑幕 (Heimu)
   .heimu, .heimu rt {
    background-color: var(--color-base, #252525);
    color: var(--color-base, #252525);
    text-shadow: none;
    transition: color 0.13s linear, background-color 0.13s linear;
    user-select: none;
}
.heimu a, a .heimu, .new .heimu {
    color: var(--color-base, #252525);
}
span.heimu:hover, span.heimu:active {
    background-color: transparent;
    color: var(--color-base--inverted, #ffffff) !important;
    user-select: text;
}
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
   ========================================================================== */


/* ==========================================================================
   3. 现代矩形自适应导航 (核心逻辑 - 彻底净化版)
   ========================================================================== */

/* 3.1 基础显隐逻辑 */
.adaptive-nav input[type="radio"] { display: none !important; }
.nav-content {
    display: none;
    overflow: hidden;
    background: var(--color-surface-2, rgba(0, 0, 0, 0.05));
    border-radius: 10px;
    margin-bottom: 10px;
}
/* 强制显示展开的内容 */
.nav-content:not(.mw-collapsed) { display: block !important; }

/* 3.2 矩形卡片 (彻底清洗 Citizen 皮肤样式) */
.nav-text-btn.mw-customtoggle {
    all: unset !important; /* 抹除皮肤默认按钮样式 */
    position: relative;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    height: 64px;
    padding: 0 24px !important;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-base, #333) !important; /* 没图时文字深色 */
    border-radius: 10px;
    background-color: transparent !important; /* 默认背景透明 */
    border: 1px solid var(--border-color-base, rgba(0,0,0,0.1)) !important;
    border-bottom: 4px solid rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease;
    overflow: hidden;
    box-sizing: border-box !important;
}

/* 杀死文字内部可能的任何蓝色背景 */
.nav-text-btn span {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 2;
}

/* 只有带 has-bg-image 类名时才显示的遮罩 */
.nav-text-btn.has-bg-image::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}
.nav-text-btn.has-bg-image { color: #fff !important; }
.nav-text-btn.has-bg-image span { text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

/* 3.3 交互反馈 */
.nav-text-btn:hover { border-color: var(--color-primary, #36c) !important; background-color: rgba(0,0,0,0.02) !important; }
.nav-text-btn:active { transform: translateY(2px); border-bottom-width: 1px !important; }

/* 3.4 背景预留区 */
.btn-bg-1, .btn-bg-2, .btn-bg-3, .btn-bg-4 { background-size: cover; background-position: center; }

/* ==========================================================================
   4. 自适应逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */
@media (min-width: 769px) {
    .adaptive-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
    .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content { grid-row: 2; grid-column: 1 / 5; margin-top: 10px; }
}
@media (max-width: 768px) {
    .adaptive-nav { display: block; }
    .nav-module { margin-bottom: 8px; }
    .nav-text-btn { width: 100%; }
    .nav-content { border-radius: 0 0 10px 10px; margin-top: -4px; border: 1px solid rgba(0, 0, 0, 0.1); border-top: none; }
}
/* ==========================================================================
   4. 自适应分屏逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */

/* PC端:横向排列按钮,内容横跨整行 */
@media (min-width: 769px) {
    .adaptive-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin: 20px 0;
    }
    .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content { 
        grid-row: 2; 
        grid-column: 1 / 5; 
        margin-top: 10px;
        border: 1px solid var(--border-color-base, rgba(255, 255, 255, 0.1));
    }

    #game-1:checked ~ .nav-module #content-1,
    #game-2:checked ~ .nav-module #content-2,
    #game-3:checked ~ .nav-module #content-3,
    #game-4:checked ~ .nav-module #content-4 {
        display: block;
    }
}

/* 移动端:按钮堆叠,内容就地展开 */
@media (max-width: 768px) {
    .adaptive-nav { display: block; padding: 0 5px; }
    .nav-module { margin-bottom: 8px; }
    .nav-text-btn { width: 100%; }
    .nav-content {
        border-radius: 0 0 10px 10px;
        margin-top: -4px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-top: none;
    }

    /* 移动端特殊:由于 display: contents 失效,直接按顺序显示内容 */
    #game-1:checked ~ .nav-module:nth-of-type(1) #content-1,
    #game-2:checked ~ .nav-module:nth-of-type(2) #content-2,
    #game-3:checked ~ .nav-module:nth-of-type(3) #content-3,
    #game-4:checked ~ .nav-module:nth-of-type(4) #content-4 {
        display: block;
    }
}

/* ==========================================================================
   5. 首页网格与内容样式 (原本保留)
   ========================================================================== */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.home-card {
    background: var(--color-surface-1);
    border: 1px solid var(--border-color-base);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.nav-sub-text {
    margin-top: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-base);
}

@keyframes slideIn { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

#custom-notetip-popup {
    position: absolute;
    display: none;
    z-index: 10000;
    background: #fff;
    border: 1px solid #a2a9b1;
    padding: 6px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 14px;
    pointer-events: none;
    max-width: 300px;
    line-height: 1.5;
}