MediaWiki:Common.css: Difference between revisions

From Begonia Wiki

No edit summary
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* Mobile-first approach or desktop-first with media queries?
/* --- MODERN BEGONIA THEME --- */
  MediaWiki usually defaults to desktop, so we'll add responsive overrides. */


:root {
/* Base styles for the content area to ensure readability */
     --begonia-green: #2d5a27;       /* Deep leaf green */
.mw-body {
     --begonia-light-green: #e9f5e8; /* Soft background tint */
     font-family: sans-serif;
     --begonia-accent: #d81b60;     /* Floral pink/red accent */
    line-height: 1.6;
     --text-main: #333333;
    color: #333;
     --shadow: 0 4px 6px rgba(0,0,0,0.07);
     max-width: 100%;
     overflow-x: hidden;
    /* Prevent horizontal scroll on small screens */
     padding: 0 10px;
     /* Add some side padding on mobile */
}
}


/* Import a modern Font from Google (Optional but recommended) */
/* Headings */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');
h1,
h2 {
    border-bottom: 4px solid #3a5f0b !important;
    /* Thick botanical green line */
    background-image: linear-gradient(to right, #E9FCE9, white);
    border-radius: 8px 8px 0 0;
    /* Rounds the top-left and top-right corners */
    padding-bottom: 5px;
    /* Space between text and line */
    margin-top: 1.5em;
    /* Space above the header */
}


body {
/* Optional: Make Level 3 Headers (sub-headers) slightly thicker too */
     background-color: #fdfdfd;
h3 {
     font-family: 'Inter', sans-serif;
     border-bottom: 2px solid #5e8c31 !important;
     color: var(--text-main);
     /* Slightly thinner green line */
    background-image: linear-gradient(to right, #E9FCE9, white);
    border-radius: 8px 8px 0 0;
     /* Rounds the top-left and top-right corners */
    padding-bottom: 3px;
}
}


/* Elegant serif for titles to give it a "Botanical Journal" feel */
h4 {
h1, h2, h3, .firstHeading {
    border-bottom: 1.5px solid #5e8c31 !important;
     font-family: 'Playfair Display', serif;
    /* Slightly thinner green line */
     font-weight: 700;
     background-image: linear-gradient(to right, #E9FCE9, white);
     color: var(--begonia-green);
     border-radius: 8px 8px 0 0;
     border-bottom: none !important;
     /* Rounds the top-left and top-right corners */
     padding-bottom: 3px;
}
}
/* Main content container */
 
#content, .mw-body {
h5,
     border: none !important;
h6 {
     border-radius: 12px;
     color: #2c4c3b;
     box-shadow: var(--shadow);
     /* A nice botanical dark green */
     padding: 2em !important;
     border-bottom: 1px solid #eaecf0;
    margin-top: 20px !important;
     padding-bottom: 0.3em;
}
}


/* Soften the look of images */
/* Infobox styling - Matching user's provided inline styles but as classes */
.thumbimage, .pi-image-thumbnail {
/* We maintain specific overrides to ensure consistency even if inline styles are missing */
.infobox {
    border: 1px solid #2e5a27;
    background-color: #f9fff9;
    color: black;
    margin: 0.5em 0 0.5em 1em;
    padding: 0;
    /* User template handles padding inside */
    float: right;
    clear: right;
    width: 300px;
    /* Defaults */
    font-family: sans-serif;
    font-size: 0.9em;
     border-radius: 8px;
     border-radius: 8px;
     border: 1px solid #eee !important;
     overflow: hidden;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}
}


.thumbinner {
/* Header style from user template */
     border: none !important;
.infobox-header {
     background-color: transparent !important;
     background-color: #2e5a27;
     color: white;
    padding: 10px;
     text-align: center;
     text-align: center;
}
    font-size: 1.2em;
/* Sidebar links */
     font-weight: bold;
.medik-sidebar .nav-link {
     font-style: italic;
    color: #555 !important;
     transition: all 0.2s ease;
     border-radius: 4px;
}
}


.medik-sidebar .nav-link:hover {
/* Image area style */
     background-color: var(--begonia-light-green) !important;
.infobox-image {
     color: var(--begonia-green) !important;
    text-align: center;
     padding-left: 15px; /* Slight slide effect */
     background-color: white;
     border-bottom: 1px solid #ddd;
     padding: 5px;
}
}


/* Active link indicator */
/* Table styles */
.medik-sidebar .active > .nav-link {
.infobox table {
     color: var(--begonia-green) !important;
     width: 100%;
    font-weight: bold;
    border-left: 4px solid var(--begonia-accent);
}
/* Modernize standard Wikitables */
.wikitable {
     border-collapse: collapse;
     border-collapse: collapse;
    border: none !important;
     background: transparent;
    background-color: white !important;
    box-shadow: var(--shadow);
    margin: 1em 0;
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners work */
}
 
.wikitable th {
     background-color: var(--begonia-green) !important;
    color: white !important;
    font-weight: 600;
    padding: 12px !important;
}
}


.wikitable td {
.infobox th {
     padding: 10px !important;
    text-align: left;
     border: 1px solid #f0f0f0 !important;
     padding: 8px;
    background: #eef7ee;
    /* User's light green */
    width: 40%;
     border-bottom: 1px solid #eee;
}
}


.wikitable tr:nth-child(even) {
.infobox td {
    background-color: #f9f9f9;
     padding: 8px;
}
     border-bottom: 1px solid #eee;
code
CSS
/* Link color */
a {
     color: #1a73e8; /* A cleaner blue */
     text-decoration: none;
}
}


a:hover {
/* Clearfix */
     color: var(--begonia-accent);
.mw-body::after {
     text-decoration: underline;
     content: "";
    display: table;
     clear: both;
}
}


/* External links icon color */
/* Mobile Responsiveness */
a.external {
@media screen and (max-width: 720px) {
    color: var(--begonia-green);
    .mw-body {
}
        padding: 0 15px;
.begonia-hero {
     }
    background: linear-gradient(135deg, var(--begonia-green), #4a7c44);
    color: white;
    padding: 40px;
     border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}


.begonia-hero h1 {
    /* Force mobile override even if inline styles exist */
    color: white !important;
    .infobox {
    margin-top: 0;
        float: none !important;
        clear: both !important;
        width: 100% !important;
        /* Full width on mobile */
        margin: 0 0 1em 0 !important;
        /* Add bottom margin, remove left margin */
        box-shadow: none;
        /* Optional: simpler look on mobile */
    }
}
}

Latest revision as of 03:40, 18 January 2026

/* Mobile-first approach or desktop-first with media queries?
   MediaWiki usually defaults to desktop, so we'll add responsive overrides. */

/* Base styles for the content area to ensure readability */
.mw-body {
    font-family: sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll on small screens */
    padding: 0 10px;
    /* Add some side padding on mobile */
}

/* Headings */
h1,
h2 {
    border-bottom: 4px solid #3a5f0b !important;
    /* Thick botanical green line */
    background-image: linear-gradient(to right, #E9FCE9, white);
    border-radius: 8px 8px 0 0;
    /* Rounds the top-left and top-right corners */
    padding-bottom: 5px;
    /* Space between text and line */
    margin-top: 1.5em;
    /* Space above the header */
}

/* Optional: Make Level 3 Headers (sub-headers) slightly thicker too */
h3 {
    border-bottom: 2px solid #5e8c31 !important;
    /* Slightly thinner green line */
    background-image: linear-gradient(to right, #E9FCE9, white);
    border-radius: 8px 8px 0 0;
    /* Rounds the top-left and top-right corners */
    padding-bottom: 3px;
}

h4 {
    border-bottom: 1.5px solid #5e8c31 !important;
    /* Slightly thinner green line */
    background-image: linear-gradient(to right, #E9FCE9, white);
    border-radius: 8px 8px 0 0;
    /* Rounds the top-left and top-right corners */
    padding-bottom: 3px;
}

h5,
h6 {
    color: #2c4c3b;
    /* A nice botanical dark green */
    border-bottom: 1px solid #eaecf0;
    padding-bottom: 0.3em;
}

/* Infobox styling - Matching user's provided inline styles but as classes */
/* We maintain specific overrides to ensure consistency even if inline styles are missing */
.infobox {
    border: 1px solid #2e5a27;
    background-color: #f9fff9;
    color: black;
    margin: 0.5em 0 0.5em 1em;
    padding: 0;
    /* User template handles padding inside */
    float: right;
    clear: right;
    width: 300px;
    /* Defaults */
    font-family: sans-serif;
    font-size: 0.9em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header style from user template */
.infobox-header {
    background-color: #2e5a27;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    font-style: italic;
}

/* Image area style */
.infobox-image {
    text-align: center;
    background-color: white;
    border-bottom: 1px solid #ddd;
    padding: 5px;
}

/* Table styles */
.infobox table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.infobox th {
    text-align: left;
    padding: 8px;
    background: #eef7ee;
    /* User's light green */
    width: 40%;
    border-bottom: 1px solid #eee;
}

.infobox td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

/* Clearfix */
.mw-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile Responsiveness */
@media screen and (max-width: 720px) {
    .mw-body {
        padding: 0 15px;
    }

    /* Force mobile override even if inline styles exist */
    .infobox {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        /* Full width on mobile */
        margin: 0 0 1em 0 !important;
        /* Add bottom margin, remove left margin */
        box-shadow: none;
        /* Optional: simpler look on mobile */
    }
}