MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
标签手工回退
 
Lyx讨论 | 贡献
无编辑摘要
第1行: 第1行:
/* ===== 侧边栏美化 ===== */
/* --- 侧边栏美化 --- */
 
/* 侧边栏整体容器 */
#mw-panel {
#mw-panel {
     font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
     font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
}


/* 侧边栏标题(导航、工具等) */
/* 侧边栏标题 */
#mw-panel .portal h3 {
#mw-panel .portal h3 {
     font-size: 14px;
     color: #2c3e50;
     font-weight: 600;
     font-weight: 600;
     color: #2c3e50;
     font-size: 0.85rem;
    text-transform: uppercase;
     letter-spacing: 0.5px;
     letter-spacing: 0.5px;
     padding: 8px 0 6px 0;
     padding: 12px 0 8px 20px;
     border-bottom: 2px solid #e8ecf1;
     border-bottom: 1px solid #e9ecef;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
}
 
/* 侧边栏链接样式 */
/* 侧边栏链接列表 */
#mw-panel .portal li a {
#mw-panel .portal .body {
    padding: 4px 0 0 0;
}
 
/* 侧边栏链接项 */
#mw-panel .portal .body ul li {
    list-style: none;
    padding: 3px 0;
    margin: 0;
}
 
/* 侧边栏链接 - 基础样式 + Hover效果 */
#mw-panel .portal .body ul li a {
     display: block;
     display: block;
     padding: 6px 10px 6px 8px;
     padding: 6px 0 6px 28px;
    font-size: 13px;
     color: #495057;
    font-weight: 400;
     font-size: 0.9rem;
     color: #4a5568;
     border-radius: 4px;
     text-decoration: none;
     transition: all 0.2s ease-in-out;
     border-radius: 6px;
     transition: all 0.25s ease-in-out;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
     position: relative;
     position: relative;
}
}


/* Hover效果 - 主要 */
/* 悬停和选中效果 - 添加图标和滑动效果 */
#mw-panel .portal .body ul li a:hover {
#mw-panel .portal li a:hover {
     color: #1a56db;
     background: #e7f3ff;
     background-color: #ebf4ff;
     color: #1a73e8;
    padding-left: 16px;
     transform: translateX(4px);
     transform: translateX(2px);
}
}


/* Hover效果 - 右侧指示条 */
#mw-panel .portal li a::before {
#mw-panel .portal .body ul li a::before {
     content: "›"; /* 或者使用Font Awesome: \f0da */
     content: '';
     position: absolute;
     position: absolute;
     left: 0;
     left: 12px;
     top: 50%;
     color: #adb5bd;
    transform: translateY(-50%);
     transition: transform 0.2s ease;
    width: 3px;
    height: 0;
    background: #1a56db;
    border-radius: 0 3px 3px 0;
     transition: height 0.25s ease;
}
 
#mw-panel .portal .body ul li a:hover::before {
    height: 70%;
}
 
/* 选中/当前页面链接 */
#mw-panel .portal .body ul li a:active,
#mw-panel .portal .body ul li a:focus {
    color: #1a56db;
    background-color: #dbeafe;
}
 
/* 侧边栏分隔线美化 */
#mw-panel .portal {
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 4px;
}
}
 
#mw-panel .portal li a:hover::before {
/* 最后一个portal去掉边框 */
     transform: rotate(90deg);
#mw-panel .portal:last-child {
    color: #1a73e8;
     border-bottom: none;
}
}


/* ===== 移动端兼容 ===== */
/* 活动/当前页面高亮 */
@media screen and (max-width: 750px) {
#mw-panel .portal li a:active,
    #mw-panel .portal .body ul li a {
#mw-panel .portal li.selected a {
        font-size: 14px;
    background: #e7f3ff;
        padding: 8px 12px;
    font-weight: 500;
    }
     border-left: 3px solid #1a73e8;
   
    #mw-panel .portal .body ul li a:hover {
        padding-left: 18px;
     }
}
}

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

/* --- 侧边栏美化 --- */
#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);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* 侧边栏标题 */
#mw-panel .portal h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 8px 20px;
    border-bottom: 1px solid #e9ecef;
}
/* 侧边栏链接样式 */
#mw-panel .portal li a {
    display: block;
    padding: 6px 0 6px 28px;
    color: #495057;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

/* 悬停和选中效果 - 添加图标和滑动效果 */
#mw-panel .portal li a:hover {
    background: #e7f3ff;
    color: #1a73e8;
    transform: translateX(4px);
}

#mw-panel .portal li a::before {
    content: "›";  /* 或者使用Font Awesome: \f0da */
    position: absolute;
    left: 12px;
    color: #adb5bd;
    transition: transform 0.2s ease;
}
#mw-panel .portal li a:hover::before {
    transform: rotate(90deg);
    color: #1a73e8;
}

/* 活动/当前页面高亮 */
#mw-panel .portal li a:active,
#mw-panel .portal li.selected a {
    background: #e7f3ff;
    font-weight: 500;
    border-left: 3px solid #1a73e8;
}