Difference between revisions of "MediaWiki:Common.css"
From UKTAPS.CO.UK Wiki
| Line 170: | Line 170: | ||
} | } | ||
| − | /* 1. | + | /* 1. 恢复顶部容器的原始定位 (不移动整个栏) */ |
#mw-head { | #mw-head { | ||
position: absolute !important; | position: absolute !important; | ||
| − | left: | + | left: 0 !important; |
right: 0 !important; | right: 0 !important; | ||
padding-left: 0 !important; | padding-left: 0 !important; | ||
} | } | ||
| − | /* 2. | + | /* 2. 侧边栏和内容区保持不动 */ |
| − | #mw-panel { | + | #mw-panel { width: 210px !important; } |
| − | + | #content, #footer { margin-left: 220px !important; } | |
| − | } | ||
| − | /* 3. | + | /* 3. 核心:只对标签页进行移动,不触碰右上角的搜索和登录 */ |
| − | # | + | #p-cactions { |
| − | margin-left: 220px !important; | + | margin-left: 220px !important; /* 这里通过 margin 将标签推到右侧 */ |
| + | position: relative !important; | ||
} | } | ||
| − | /* 4. | + | /* 4. 如果个人工具栏(右上角)位置不对,确保它在右侧 */ |
| − | #p- | + | #p-personal { |
| − | + | position: absolute !important; | |
| + | right: 10px !important; | ||
| + | top: 0 !important; | ||
} | } | ||
Revision as of 14:45, 6 June 2026
/* ==========================================================================
1. 首页卡片与横幅现代布局 (Main Page Layout)
========================================================================== */
.mainpage-card {
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 15px;
margin: 10px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
transition: box-shadow 0.3s;
}
.mainpage-card:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.mainpage-card h3 {
margin-top: 0;
color: #0645ad;
border-bottom: 1px solid #eee;
padding-bottom: 8px;
}
.mainpage-card p {
margin: 8px 0;
color: #333;
}
.mainpage-card a {
color: #3366bb;
text-decoration: none;
}
.mainpage-card a:hover {
text-decoration: underline;
}
.card-grid {
display: flex;
flex-wrap: wrap;
gap: 15px;
margin: 10px 0;
}
.card-grid .mainpage-card {
flex: 1 1 300px;
max-width: 100%;
}
.wiki-welcome-banner {
text-align: center !important;
padding: 30px 20px !important;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
border-radius: 12px !important;
margin-bottom: 25px !important;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.wiki-welcome-banner h1.welcome-title {
color: #e94560 !important;
font-size: 2.6em !important;
margin: 0 0 10px 0 !important;
padding: 0 !important;
border-bottom: none !important;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
font-weight: 700 !important;
}
.wiki-welcome-banner p.welcome-subtitle {
color: #dddddd !important;
font-size: 1.2em !important;
margin: 0 !important;
padding: 0 !important;
}
/* ==========================================================================
2. UKTaps Wiki 全局蓝色调视觉系统覆盖(匹配主站商城)
========================================================================== */
:root {
--uktaps-blue: #0A3663; /* 主视觉:深邃皇家卫浴蓝 */
--uktaps-light-blue: #F0F4F8; /* 辅助色:极浅蓝底色 */
--uktaps-cyan: #0076A8; /* 互动色:链接与高亮蓝 */
}
a, .mw-body a.external, .mw-body a.extiw {
color: var(--uktaps-cyan) !important;
}
a:hover {
color: var(--uktaps-blue) !important;
text-decoration: underline !important;
}
#mw-head, #mw-panel .portal h3 {
border-bottom-color: var(--uktaps-blue) !important;
color: var(--uktaps-blue) !important;
}
.firstHeading {
border-bottom: 3px solid var(--uktaps-blue) !important;
color: var(--uktaps-blue) !important;
padding-bottom: 8px !important;
}
.section-header {
background: linear-gradient(135deg, var(--uktaps-blue) 0%, #164E87 100%);
padding: 16px 20px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(10, 54, 99, 0.1);
margin: 25px 0 15px 0;
}
.section-header h2 {
color: #ffffff !important;
font-size: 1.35em !important;
font-weight: 600 !important;
margin: 0 !important;
padding: 0 !important;
border-bottom: none !important;
display: flex;
align-items: center;
letter-spacing: 0.3px;
}
.section-header h2::before {
content: "📘";
margin-right: 10px;
font-size: 1.1em;
}
/* ==========================================================================
3. 侧边栏整体拓宽(给长英文留足生存空间,保持单行展示)
========================================================================== */
#mw-panel {
width: 210px !important;
}
#content, #mw-head-base, #footer {
margin-left: 220px !important;
}
#p-CATEGORIES ul li a {
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
display: block !important;
}
/* ==========================================================================
4. 用现代 CSS 属性选择器实现子分类完美“常驻全显示”与“安全缩进”
========================================================================== */
#p-CATEGORIES ul li a[href*="Antique_Basin_Taps"],
#p-CATEGORIES ul li a[href*="Basin_Taps"],
#p-CATEGORIES ul li a[href*="Bidet_Taps"],
#p-CATEGORIES ul li a[href*="Black_Bathroom_Taps"],
#p-CATEGORIES ul li a[href*="Gold_Bathroom_Taps"],
#p-CATEGORIES ul li a[href*="LED_Bathroom_Sink_Taps"],
#p-CATEGORIES ul li a[href*="Wall_Mounted_Basin_Taps"],
#p-CATEGORIES ul li a[href*="Modern_Shower_Sets"],
#p-CATEGORIES ul li a[href*="Traditional_Shower_Sets"],
#p-CATEGORIES ul li a[href*="Antique_Kitchen_Taps"],
#p-CATEGORIES ul li a[href*="Black_Kitchen_Taps"],
#p-CATEGORIES ul li a[href*="Kitchen_Basin_Taps"],
#p-CATEGORIES ul li a[href*="LED_Kitchen_Taps"],
#p-CATEGORIES ul li a[href*="Pull_Out_Kitchen_Taps"],
#p-CATEGORIES ul li a[href*="Three_Way_Kitchen_Taps"],
#p-CATEGORIES ul li a[href*="Deck_Mounted_Bath_Taps"],
#p-CATEGORIES ul li a[href*="Freestanding_Bath_Taps"],
#p-CATEGORIES ul li a[href*="Wall_Mounted_Bath_Taps"],
#p-CATEGORIES ul li a[href*="Bathroom_Mirrors"],
#p-CATEGORIES ul li a[href*="Bathroom_Shelves"],
#p-CATEGORIES ul li a[href*="Floor_Drain"],
#p-CATEGORIES ul li a[href*="Hair_Dryer_Holder"],
#p-CATEGORIES ul li a[href*="Robe_Hook"],
#p-CATEGORIES ul li a[href*="Rubber_Spray_Series"],
#p-CATEGORIES ul li a[href*="Soap_Holders"],
#p-CATEGORIES ul li a[href*="Taps_Accessories"],
#p-CATEGORIES ul li a[href*="Toilet_Brush_Holder"],
#p-CATEGORIES ul li a[href*="Toilet_Roll_Holder"],
#p-CATEGORIES ul li a[href*="Toothbrush_Holder"],
#p-CATEGORIES ul li a[href*="Towel_Bar"],
#p-CATEGORIES ul li a[href*="Towel_Ring"] {
padding-left: 20px !important; /* 核心:用安全边距缩进代替空格 */
font-size: 13px !important; /* 子分类字体略小一些,拉开主次层级 */
color: #555 !important; /* 舒适的灰色,不抢主分类风头 */
margin: 4px 0 !important;
}
/* 1. 恢复顶部容器的原始定位 (不移动整个栏) */
#mw-head {
position: absolute !important;
left: 0 !important;
right: 0 !important;
padding-left: 0 !important;
}
/* 2. 侧边栏和内容区保持不动 */
#mw-panel { width: 210px !important; }
#content, #footer { margin-left: 220px !important; }
/* 3. 核心:只对标签页进行移动,不触碰右上角的搜索和登录 */
#p-cactions {
margin-left: 220px !important; /* 这里通过 margin 将标签推到右侧 */
position: relative !important;
}
/* 4. 如果个人工具栏(右上角)位置不对,确保它在右侧 */
#p-personal {
position: absolute !important;
right: 10px !important;
top: 0 !important;
}