MediaWiki:Common.css: Difference between revisions
From Lenn's Fun Stuff
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ============================================================ | /* ============================================================ | ||
PORTABLE INFOBOX | SAFE VERSION - PORTABLE INFOBOX & LEAF THEME | ||
============================================================ */ | ============================================================ */ | ||
/* | /* --- 1. INFOBOX SECTION --- */ | ||
body.mediawiki .portable-infobox { | body.mediawiki .portable-infobox { | ||
background-color: #ffffff !important; | background-color: #ffffff !important; | ||
| Line 9: | Line 9: | ||
width: 300px !important; | width: 300px !important; | ||
float: right !important; | float: right !important; | ||
margin: 0 0 1em 1em !important; | margin: 0 0 1em 1em !important; | ||
font-family: "Georgia", serif !important; | font-family: "Georgia", serif !important; | ||
overflow: hidden !important; | overflow: hidden !important; | ||
} | } | ||
body.mediawiki .pi-title { | body.mediawiki .pi-title { | ||
background-color: #003366 !important; | background-color: #003366 !important; | ||
color: #ffffff !important; | color: #ffffff !important; | ||
text-align: center !important; | text-align: center !important; | ||
padding: 10px !important; | padding: 10px !important; | ||
} | } | ||
body.mediawiki .pi-header { | body.mediawiki .pi-header { | ||
background-color: #3e5a47 !important; | background-color: #3e5a47 !important; | ||
color: #ffffff !important; | color: #ffffff !important; | ||
text-align: center !important; | text-align: center !important; | ||
padding: 6px 0 !important; | padding: 6px 0 !important; | ||
font-size: 10px !important; | font-size: 10px !important; | ||
} | } | ||
/* Data | /* Data Rows Side-by-Side */ | ||
body.mediawiki .pi-data { | body.mediawiki .pi-data { | ||
display: flex !important; | display: flex !important; | ||
border-bottom: 1px solid #e0e0e0 !important; | border-bottom: 1px solid #e0e0e0 !important; | ||
} | } | ||
body.mediawiki .pi-data-label { | body.mediawiki .pi-data-label { | ||
background-color: #f2f2f2 !important; | background-color: #f2f2f2 !important; | ||
padding: 8px 12px !important; | padding: 8px 12px !important; | ||
flex: 0 0 40% !important; | flex: 0 0 40% !important; | ||
border-right: 1px solid #dddddd !important; | border-right: 1px solid #dddddd !important; | ||
} | } | ||
body.mediawiki .pi-data-value { | body.mediawiki .pi-data-value { | ||
padding: 8px 12px !important; | padding: 8px 12px !important; | ||
flex: 1 !important; | flex: 1 !important; | ||
} | } | ||
/* Infobox Leaf Bullets */ | |||
body.mediawiki .pi-data-value li::before { | body.mediawiki .pi-data-value li::before { | ||
content: "\1F343" !important; | content: "\1F343" !important; | ||
margin-right: 5px !important; | |||
} | } | ||
/* --- 2. THE SAFE HEADERS (The Fix) --- */ | |||
/* This avoids using "absolute" positioning which was breaking your layout */ | |||
#mw-content-text h2, | #mw-content-text h2, | ||
.mw-body-content h2 { | .mw-body-content h2 { | ||
border-bottom: 2px solid #3e5a47 !important; | border-bottom: 2px solid #3e5a47 !important; | ||
color: #003366 !important; | color: #003366 !important; | ||
padding-bottom: 5px !important; | |||
} | } | ||
#mw-content-text | #mw-content-text h2::before { | ||
content: "\1F343 " !important; /* The space after the code is important */ | |||
content: "\1F343" !important; | font-size: 20px !important; | ||
font-size: | |||
} | } | ||
#mw-content-text h3::before { | |||
#mw-content-text h3 | content: "\1F343 " !important; | ||
font-size: 16px !important; | |||
font- | |||
} | } | ||
/* --- 3. UI PROTECTION --- */ | |||
. | /* Specifically prevents the sidebar and search from being affected */ | ||
#p-search, #p-navigation, #p-logo, .vector-menu { | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
position: static !important; | |||
/* | |||
#p-search, | |||
# | |||
# | |||
. | |||
padding | |||
margin | |||
position: | |||
} | } | ||
Revision as of 01:35, 12 March 2026
/* ============================================================
SAFE VERSION - PORTABLE INFOBOX & LEAF THEME
============================================================ */
/* --- 1. INFOBOX SECTION --- */
body.mediawiki .portable-infobox {
background-color: #ffffff !important;
border: 2px solid #003366 !important;
width: 300px !important;
float: right !important;
margin: 0 0 1em 1em !important;
font-family: "Georgia", serif !important;
overflow: hidden !important;
}
body.mediawiki .pi-title {
background-color: #003366 !important;
color: #ffffff !important;
text-align: center !important;
padding: 10px !important;
}
body.mediawiki .pi-header {
background-color: #3e5a47 !important;
color: #ffffff !important;
text-align: center !important;
padding: 6px 0 !important;
font-size: 10px !important;
}
/* Data Rows Side-by-Side */
body.mediawiki .pi-data {
display: flex !important;
border-bottom: 1px solid #e0e0e0 !important;
}
body.mediawiki .pi-data-label {
background-color: #f2f2f2 !important;
padding: 8px 12px !important;
flex: 0 0 40% !important;
border-right: 1px solid #dddddd !important;
}
body.mediawiki .pi-data-value {
padding: 8px 12px !important;
flex: 1 !important;
}
/* Infobox Leaf Bullets */
body.mediawiki .pi-data-value li::before {
content: "\1F343" !important;
margin-right: 5px !important;
}
/* --- 2. THE SAFE HEADERS (The Fix) --- */
/* This avoids using "absolute" positioning which was breaking your layout */
#mw-content-text h2,
.mw-body-content h2 {
border-bottom: 2px solid #3e5a47 !important;
color: #003366 !important;
padding-bottom: 5px !important;
}
#mw-content-text h2::before {
content: "\1F343 " !important; /* The space after the code is important */
font-size: 20px !important;
}
#mw-content-text h3::before {
content: "\1F343 " !important;
font-size: 16px !important;
}
/* --- 3. UI PROTECTION --- */
/* Specifically prevents the sidebar and search from being affected */
#p-search, #p-navigation, #p-logo, .vector-menu {
padding: 0 !important;
margin: 0 !important;
position: static !important;
}