MediaWiki:Common.css: Difference between revisions

From Lenn's Fun Stuff

No edit summary
No edit summary
Line 1: Line 1:
/* ============================================================
/* ============================================================
   SAFE VERSION - PORTABLE INFOBOX & LEAF THEME
   ULTRA-SAFE KH LEAF THEME (FIXES ALIGNMENT)
   ============================================================ */
   ============================================================ */


/* --- 1. INFOBOX SECTION --- */
/* 1. INFOBOX SECTION */
body.mediawiki .portable-infobox {
body.mediawiki .portable-infobox {
     background-color: #ffffff !important;
     background-color: #ffffff !important;
Line 12: Line 12:
     font-family: "Georgia", serif !important;
     font-family: "Georgia", serif !important;
     overflow: hidden !important;
     overflow: hidden !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15) !important;
}
}


Line 19: Line 20:
     text-align: center !important;
     text-align: center !important;
     padding: 10px !important;
     padding: 10px !important;
    font-size: 16px !important;
}
}


Line 27: Line 29:
     padding: 6px 0 !important;
     padding: 6px 0 !important;
     font-size: 10px !important;
     font-size: 10px !important;
    text-transform: uppercase !important;
}
}


Line 40: Line 43:
     flex: 0 0 40% !important;
     flex: 0 0 40% !important;
     border-right: 1px solid #dddddd !important;
     border-right: 1px solid #dddddd !important;
    font-size: 11px !important;
    font-weight: bold !important;
}
}


Line 45: Line 50:
     padding: 8px 12px !important;
     padding: 8px 12px !important;
     flex: 1 !important;
     flex: 1 !important;
    font-size: 11px !important;
}
}


/* Infobox Leaf Bullets */
/* Infobox Leaf Bullets */
body.mediawiki .pi-data-value ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.mediawiki .pi-data-value li::before {
body.mediawiki .pi-data-value li::before {
     content: "\1F343" !important;
     content: "\1F343" !important; /* Unicode Leaf 🍃 */
     margin-right: 5px !important;
     margin-right: 8px !important;
}
}


/* --- 2. THE SAFE HEADERS (The Fix) --- */
/* 2. THE SCOPED HEADERS (The Alignment Fix) */
/* This avoids using "absolute" positioning which was breaking your layout */
/* .mw-parser-output ensures this ONLY affects the article content */


#mw-content-text h2,
.mw-parser-output h2 {
.mw-body-content h2 {
     border-bottom: 2px solid #3e5a47 !important;
     border-bottom: 2px solid #3e5a47 !important;
     color: #003366 !important;
     color: #003366 !important;
    margin-top: 1.5em !important;
     padding-bottom: 5px !important;
     padding-bottom: 5px !important;
}
}


#mw-content-text h2::before {
.mw-parser-output h2::before {
     content: "\1F343 " !important; /* The space after the code is important */
     content: "\1F343 " !important;
     font-size: 20px !important;
     font-size: 20px !important;
}
}


#mw-content-text h3::before {
.mw-parser-output h3 {
     content: "\1F343 " !important;
    color: #3e5a47 !important;
    margin-top: 1em !important;
}
 
.mw-parser-output h3::before {
     content: "\1F343 " !important;
     font-size: 16px !important;
     font-size: 16px !important;
}
}


/* --- 3. UI PROTECTION --- */
/* 3. UI PROTECTION SHIELD */
/* Specifically prevents the sidebar and search from being affected */
/* Forces search, sidebar, and logos to ignore the rules above */
#p-search, #p-navigation, #p-logo, .vector-menu {
#p-search,  
#p-navigation,  
#p-logo,  
#mw-panel,
#searchform,
.vector-menu-heading,
.mw-header {
     padding: 0 !important;
     padding: 0 !important;
     margin: 0 !important;
     margin: 0 !important;
     position: static !important;
     position: static !important;
    border: none !important;
}
/* Ensures the leaf NEVER appears in navigation or search results */
#mw-panel h3::before,
.vector-menu-heading::before,
#p-search h3::before {
    content: none !important;
    display: none !important;
}
}

Revision as of 01:36, 12 March 2026

/* ============================================================
   ULTRA-SAFE KH LEAF THEME (FIXES ALIGNMENT)
   ============================================================ */

/* 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;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15) !important;
}

body.mediawiki .pi-title {
    background-color: #003366 !important; 
    color: #ffffff !important;
    text-align: center !important;
    padding: 10px !important;
    font-size: 16px !important;
}

body.mediawiki .pi-header {
    background-color: #3e5a47 !important; 
    color: #ffffff !important;
    text-align: center !important;
    padding: 6px 0 !important;
    font-size: 10px !important;
    text-transform: uppercase !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;
    font-size: 11px !important;
    font-weight: bold !important;
}

body.mediawiki .pi-data-value {
    padding: 8px 12px !important;
    flex: 1 !important;
    font-size: 11px !important;
}

/* Infobox Leaf Bullets */
body.mediawiki .pi-data-value ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.mediawiki .pi-data-value li::before {
    content: "\1F343" !important; /* Unicode Leaf 🍃 */
    margin-right: 8px !important;
}

/* 2. THE SCOPED HEADERS (The Alignment Fix) */
/* .mw-parser-output ensures this ONLY affects the article content */

.mw-parser-output h2 {
    border-bottom: 2px solid #3e5a47 !important;
    color: #003366 !important;
    margin-top: 1.5em !important;
    padding-bottom: 5px !important;
}

.mw-parser-output h2::before {
    content: "\1F343  " !important;
    font-size: 20px !important;
}

.mw-parser-output h3 {
    color: #3e5a47 !important;
    margin-top: 1em !important;
}

.mw-parser-output h3::before {
    content: "\1F343  " !important;
    font-size: 16px !important;
}

/* 3. UI PROTECTION SHIELD */
/* Forces search, sidebar, and logos to ignore the rules above */
#p-search, 
#p-navigation, 
#p-logo, 
#mw-panel, 
#searchform, 
.vector-menu-heading,
.mw-header {
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    border: none !important;
}

/* Ensures the leaf NEVER appears in navigation or search results */
#mw-panel h3::before, 
.vector-menu-heading::before, 
#p-search h3::before {
    content: none !important;
    display: none !important;
}