MediaWiki:Common.css:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* --- | /* --- 侧边栏扩宽 + 美化 --- */ | ||
#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; | ||
| 第8行: | 第9行: | ||
} | } | ||
/* 侧边栏标题 | /* 同步调整主体内容左移,避免被侧边栏遮挡 */ | ||
#content { | |||
margin-left: 280px !important; | |||
} | |||
/* 侧边栏标题 */ | |||
#mw-panel .portal h3 { | #mw-panel .portal h3 { | ||
color: #2c3e50; | color: #2c3e50; | ||
| 第15行: | 第21行: | ||
text-transform: uppercase; | text-transform: uppercase; | ||
letter-spacing: 0.5px; | letter-spacing: 0.5px; | ||
padding: 12px 0 8px | padding: 12px 0 8px 16px; | ||
border-bottom: 1px solid #e9ecef; | border-bottom: 1px solid #e9ecef; | ||
margin: 0; | margin: 0; | ||
| 第26行: | 第32行: | ||
} | } | ||
#mw-panel .portal li { | #mw-panel .portal li { | ||
list-style: none; | list-style: none; | ||
| 第33行: | 第38行: | ||
} | } | ||
/* 链接样式 */ | /* 链接样式 - 现在空间充足了 */ | ||
#mw-panel .portal li a { | #mw-panel .portal li a { | ||
display: block; | display: block; | ||
| 第43行: | 第48行: | ||
position: relative; | position: relative; | ||
white-space: nowrap; | white-space: nowrap; | ||
margin: 2px 8px; | 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( | transform: translateX(4px); | ||
} | } | ||
#mw-panel .portal li a::before { | #mw-panel .portal li a::before { | ||
content: "›"; | content: "›"; | ||
| 第72行: | 第73行: | ||
} | } | ||
#mw-panel .portal li.selected a, | #mw-panel .portal li.selected a, | ||
#mw-panel .portal li a:active { | #mw-panel .portal li a:active { | ||
| 第95行: | 第95行: | ||
content: "·"; | content: "·"; | ||
font-size: 1.2rem; | font-size: 1.2rem; | ||
} | |||
/* 响应式:小屏幕恢复折叠 */ | |||
@media (max-width: 720px) { | |||
#mw-panel { | |||
width: 260px !important; | |||
} | |||
#content { | |||
margin-left: 0 !important; | |||
} | |||
} | } | ||
2026年7月8日 (三) 00:33的版本
/* --- 侧边栏扩宽 + 美化 --- */
#mw-panel {
width: 280px !important; /* 默认约160px,扩宽到280px */
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;
}
/* 同步调整主体内容左移,避免被侧边栏遮挡 */
#content {
margin-left: 280px !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;
margin: 2px 8px;
}
#mw-panel .portal li a:hover {
background: #e7f3ff;
color: #1a73e8;
transform: translateX(4px);
}
#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;
}
/* 响应式:小屏幕恢复折叠 */
@media (max-width: 720px) {
#mw-panel {
width: 260px !important;
}
#content {
margin-left: 0 !important;
}
}