MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
Lyx讨论 | 贡献
无编辑摘要
第1行: 第1行:
/* --- 侧边栏扩宽 + 美化 --- */
/* 侧边栏容器美化 - 适配vector皮肤 */
#mw-panel {
#mw-panel {
    width: 280px !important;  /* 默认约160px,扩宽到280px */
     background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
     background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
     border-right: 1px solid #dee2e6;
     border-right: 1px solid #dee2e6;
     box-shadow: 2px 0 5px rgba(0,0,0,0.05);
     box-shadow: 2px 0 5px rgba(0,0,0,0.05);
     font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
     transition: all 0.3s ease;
    padding: 0 !important;
}
}


/* 同步调整主体内容左移,避免被侧边栏遮挡 */
/* 一级菜单样式(带图标) */
#content {
#mw-panel .portal {
     margin-left: 280px !important;
     margin-bottom: 0.5em;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5em;
}
}


/* 侧边栏标题 */
#mw-panel .portal h5 {
#mw-panel .portal h3 {
     background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23495057" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>') no-repeat left center;
     color: #2c3e50;
     padding-left: 24px;
    font-weight: 600;
     cursor: pointer;
    font-size: 0.85rem;
     user-select: none;
    text-transform: uppercase;
     transition: color 0.2s;
     letter-spacing: 0.5px;
     padding: 12px 0 8px 16px;
     border-bottom: 1px solid #e9ecef;
     margin: 0;
}
}


/* 列表容器 */
#mw-panel .portal h5:hover {
#mw-panel .portal .body {
     color: #0d6efd;
     padding: 0 !important;
    margin: 0 !important;
}
}


#mw-panel .portal li {
/* 二级菜单项悬停动效 */
     list-style: none;
#mw-panel .portal .body ul li {
     margin: 0;
     padding: 4px 0 4px 24px;
     padding: 0;
     transition: all 0.2s ease;
     border-radius: 4px;
    margin: 2px 8px;
}
}


/* 链接样式 - 现在空间充足了 */
#mw-panel .portal .body ul li a {
#mw-panel .portal li a {
     display: block;
     display: block;
    padding: 6px 8px 6px 28px;
     color: #495057;
     color: #495057;
    font-size: 0.9rem;
     transition: all 0.2s ease;
    border-radius: 4px;
     transition: all 0.2s ease-in-out;
    position: relative;
    white-space: nowrap;
    margin: 2px 8px;
}
}


#mw-panel .portal li a:hover {
#mw-panel .portal .body ul li:hover {
     background: #e7f3ff;
     background: #dee2e6;
    color: #1a73e8;
     transform: translateX(4px);
     transform: translateX(4px);
}
}


#mw-panel .portal li a::before {
#mw-panel .portal .body ul li:hover a {
    content: "›";
     color: #0d6efd;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}
 
#mw-panel .portal li a:hover::before {
    transform: translateY(-50%) rotate(90deg);
     color: #1a73e8;
}
 
#mw-panel .portal li.selected a,
#mw-panel .portal li a:active {
    background: #e7f3ff;
     font-weight: 500;
     font-weight: 500;
    border-left: 3px solid #1a73e8;
    padding-left: 25px;
}
/* 子菜单 */
#mw-panel .portal li ul {
    padding-left: 16px !important;
}
#mw-panel .portal li ul li a {
    padding-left: 20px;
    font-size: 0.85rem;
}
#mw-panel .portal li ul li a::before {
    left: 6px;
    content: "·";
    font-size: 1.2rem;
}
/* 响应式:小屏幕恢复折叠 */
@media (max-width: 720px) {
    #mw-panel {
        width: 260px !important;
    }
    #content {
        margin-left: 0 !important;
    }
}
}

2026年7月8日 (三) 00:34的版本

/* 侧边栏容器美化 - 适配vector皮肤 */
#mw-panel {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* 一级菜单样式(带图标) */
#mw-panel .portal {
    margin-bottom: 0.5em;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5em;
}

#mw-panel .portal h5 {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23495057" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>') no-repeat left center;
    padding-left: 24px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

#mw-panel .portal h5:hover {
    color: #0d6efd;
}

/* 二级菜单项悬停动效 */
#mw-panel .portal .body ul li {
    padding: 4px 0 4px 24px;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 8px;
}

#mw-panel .portal .body ul li a {
    display: block;
    color: #495057;
    transition: all 0.2s ease;
}

#mw-panel .portal .body ul li:hover {
    background: #dee2e6;
    transform: translateX(4px);
}

#mw-panel .portal .body ul li:hover a {
    color: #0d6efd;
    font-weight: 500;
}