MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
Lyx讨论 | 贡献
无编辑摘要
第1行: 第1行:
/* --- 侧边栏美化 --- */
/* --- 侧边栏美化(紧凑版) --- */
#mw-panel {
#mw-panel {
     background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
     background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
第5行: 第5行:
     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;
     font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    padding: 0 !important; /* 移除整体内边距 */
}
}


第14行: 第15行:
     text-transform: uppercase;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     letter-spacing: 0.5px;
     padding: 12px 0 8px 20px;
     padding: 12px 0 8px 16px; /* 减少左边距 */
     border-bottom: 1px solid #e9ecef;
     border-bottom: 1px solid #e9ecef;
    margin: 0;
}
}
/* 侧边栏链接样式 */
 
/* 侧边栏列表容器 - 移除默认内边距 */
#mw-panel .portal .body {
    padding: 0 !important;
    margin: 0 !important;
}
 
/* 侧边栏链接样式 - 更紧凑 */
#mw-panel .portal li {
    list-style: none;
    margin: 0;
    padding: 0;
}
 
#mw-panel .portal li a {
#mw-panel .portal li a {
     display: block;
     display: block;
     padding: 6px 0 6px 28px;
     padding: 6px 8px 6px 28px; /* 左边留出图标位置,右侧紧凑 */
     color: #495057;
     color: #495057;
     font-size: 0.9rem;
     font-size: 0.9rem;
第26行: 第41行:
     transition: all 0.2s ease-in-out;
     transition: all 0.2s ease-in-out;
     position: relative;
     position: relative;
    white-space: nowrap; /* 强制文字不换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 如果太长显示省略号 */
    margin: 2px 8px; /* 左右留小间距,避免贴边 */
}
}


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


/* 链接前面的小箭头图标 */
#mw-panel .portal li a::before {
#mw-panel .portal li a::before {
     content: "›"; /* 或者使用Font Awesome: \f0da */
     content: "›";
     position: absolute;
     position: absolute;
     left: 12px;
     left: 10px; /* 调整位置更靠左 */
    top: 50%;
    transform: translateY(-50%);
     color: #adb5bd;
     color: #adb5bd;
    font-size: 1.1rem;
     transition: transform 0.2s ease;
     transition: transform 0.2s ease;
}
}
#mw-panel .portal li a:hover::before {
#mw-panel .portal li a:hover::before {
     transform: rotate(90deg);
     transform: translateY(-50%) rotate(90deg);
     color: #1a73e8;
     color: #1a73e8;
}
}


/* 活动/当前页面高亮 */
/* 活动/当前页面高亮 */
#mw-panel .portal li a:active,
#mw-panel .portal li.selected a,
#mw-panel .portal li.selected a {
#mw-panel .portal li a:active {
     background: #e7f3ff;
     background: #e7f3ff;
     font-weight: 500;
     font-weight: 500;
     border-left: 3px solid #1a73e8;
     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;
}
/* 特殊:如果图标使用Font Awesome,调整位置 */
#mw-panel .portal li a .fa,
#mw-panel .portal li a .fas,
#mw-panel .portal li a .far {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}
}

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

/* --- 侧边栏美化(紧凑版) --- */
#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;
    padding: 0 !important; /* 移除整体内边距 */
}

/* 侧边栏标题 */
#mw-panel .portal h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 8px 16px; /* 减少左边距 */
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

/* 侧边栏列表容器 - 移除默认内边距 */
#mw-panel .portal .body {
    padding: 0 !important;
    margin: 0 !important;
}

/* 侧边栏链接样式 - 更紧凑 */
#mw-panel .portal li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#mw-panel .portal li a {
    display: block;
    padding: 6px 8px 6px 28px; /* 左边留出图标位置,右侧紧凑 */
    color: #495057;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
    white-space: nowrap; /* 强制文字不换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 如果太长显示省略号 */
    margin: 2px 8px; /* 左右留小间距,避免贴边 */
}

/* 悬停和选中效果 */
#mw-panel .portal li a:hover {
    background: #e7f3ff;
    color: #1a73e8;
    transform: translateX(2px); /* 减小移动距离 */
}

/* 链接前面的小箭头图标 */
#mw-panel .portal li a::before {
    content: "›";
    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;
    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;
}

/* 特殊:如果图标使用Font Awesome,调整位置 */
#mw-panel .portal li a .fa,
#mw-panel .portal li a .fas,
#mw-panel .portal li a .far {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}