MediaWiki:Common.css: Difference between revisions

From Begonia Wiki

No edit summary
No edit summary
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. */


 
/* Base styles for the content area to ensure readability */
 
 
/* Import a modern Font from Google (Optional but recommended) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');
 
:root {
    --begonia-green: #2d5a27;
    /* Deep leaf green */
    --begonia-light-green: #e9f5e8;
    /* Soft background tint */
    --begonia-accent: #d81b60;
    /* Floral pink/red accent */
    --text-main: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}
 
body {
    background-color: #fdfdfd;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}
 
/* Elegant serif for titles to give it a "Botanical Journal" feel */
h1,
h2,
h3,
.firstHeading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--begonia-green);
    border-bottom: none !important;
}
 
/* Main content container */
#content,
.mw-body {
.mw-body {
     border: none !important;
     font-family: sans-serif;
     border-radius: 12px;
     line-height: 1.6;
     box-shadow: var(--shadow);
     color: #333;
     padding: 2em !important;
     max-width: 100%;
     margin-top: 20px !important;
     overflow-x: hidden; /* Prevent horizontal scroll on small screens */
}
     padding: 0 10px; /* Add some side padding on mobile */
 
/* Mobile Infobox Fix: Stack vertically on small screens */
@media only screen and (max-width: 720px) {
     .infobox {
        float: none !important;      /* Stop floating to the right */
        width: 100% !important;      /* Make it fill the width */
        margin: 0 auto 1em auto !important; /* Center it and add bottom spacing */
        clear: both;                /* Ensure no other elements crowd it */
    }
}
 
/* Soften the look of images */
.thumbimage,
.pi-image-thumbnail {
    border-radius: 8px;
    border: 1px solid #eee !important;
}
 
.thumbinner {
    border: none !important;
    background-color: transparent !important;
    text-align: center;
}
}


/* Sidebar links */
/* Headings */
.medik-sidebar .nav-link {
h1, h2, h3, h4, h5, h6 {
     color: #555 !important;
     color: #2c4c3b; /* A nice botanical dark green */
     transition: all 0.2s ease;
     border-bottom: 1px solid #eaecf0;
     border-radius: 4px;
     padding-bottom: 0.3em;
}
}


.medik-sidebar .nav-link:hover {
/* Infobox styling - Standard Desktop (and default) */
     background-color: var(--begonia-light-green) !important;
.infobox {
     color: var(--begonia-green) !important;
    border: 1px solid #a2a9b1;
     padding-left: 15px;
     background-color: #f8f9fa;
     /* Slight slide effect */
     color: black;
    margin: 0.5em 0 0.5em 1em;
     padding: 0.2em;
    float: right;
    clear: right;
     width: 300px; /* Fixed width on desktop */
    font-size: 90%;
    line-height: 1.5;
}
}


/* Active link indicator */
/* Clearfix for floats if needed, though MW usually handles this */
.medik-sidebar .active>.nav-link {
.mw-body::after {
     color: var(--begonia-green) !important;
     content: "";
     font-weight: bold;
     display: table;
     border-left: 4px solid var(--begonia-accent);
     clear: both;
}
}


/* Modernize standard Wikitables */
/* Internal infobox table styling (simulated based on typical MW infoboxes) */
.wikitable {
.infobox table {
    width: 100%;
     border-collapse: collapse;
     border-collapse: collapse;
    border: none !important;
    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 {
    padding: 10px !important;
    border: 1px solid #f0f0f0 !important;
}
}


.wikitable tr:nth-child(even) {
.infobox th {
     background-color: #f9f9f9;
     background-color: #e6f2e6; /* Light green header */
}
 
/* Link color */
a {
    color: #1a73e8;
    /* A cleaner blue */
    text-decoration: none;
}
 
a:hover {
    color: var(--begonia-accent);
    text-decoration: underline;
}
 
/* External links icon color */
a.external {
    color: var(--begonia-green);
}
 
.begonia-hero {
    background: linear-gradient(135deg, var(--begonia-green), #4a7c44);
    color: white;
    padding: 40px;
    border-radius: 12px;
     text-align: center;
     text-align: center;
     margin-bottom: 30px;
     padding: 0.5em;
}
}


.begonia-hero h1 {
.infobox td {
     color: white !important;
     padding: 0.4em;
    margin-top: 0;
}
}


/* --- ENHANCED UI ELEMENTS --- */
.infobox img {
 
     max-width: 100%;
/* 1. Modern Table of Contents */
     height: auto;
#toc,
     display: block;
.toc {
     margin: 0 auto;
     background-color: #ffffff;
    border: none !important;
     border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    padding: 1.5em;
     display: inline-block;
     min-width: 250px;
}
}


#toc h2,
/* Mobile Responsiveness */
.toc h2 {
@media screen and (max-width: 720px) {
    font-family: 'Playfair Display', serif;
     .mw-body {
     font-size: 1.4em;
        padding: 0 15px;
    color: var(--begonia-green);
     }
    border-bottom: 2px solid var(--begonia-light-green);
    padding-bottom: 0.5em;
     margin-bottom: 0.5em;
}


#toc ul,
    /* Stack the infobox on top or bottom, remove float */
.toc ul {
    .infobox {
    list-style-type: none;
        float: none;
    padding-left: 0;
        clear: both;
}
        width: 100%; /* Full width on mobile */
 
        margin: 0 0 1em 0; /* Add bottom margin to separate from text */
#toc li,
        box-sizing: border-box; /* Ensure padding doesn't overflow width */
.toc li {
     }
    padding: 4px 0;
}
 
/* 2. Forms & Inputs */
input[type="text"],
input[type="search"],
textarea,
#searchInput {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}
 
input[type="text"]:focus,
input[type="search"]:focus,
textarea:focus,
#searchInput:focus {
    border-color: var(--begonia-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}
 
/* Buttons */
button,
input[type="submit"],
input[type="button"],
.mw-ui-button {
    background-color: var(--begonia-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}
 
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.mw-ui-button:hover {
    background-color: #1e3f1a;
    /* Darker green */
}
 
/* 3. Code Blocks */
pre,
code,
.mw-code {
    background-color: #f7f9f7;
    /* Very light green hint */
    border: 1px solid #e1e8e1;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #2c4a2c;
    padding: 0.2em 0.4em;
}
 
pre {
    padding: 1em;
    overflow-x: auto;
}
 
/* 4. Alert/Message Boxes */
.begonia-alert {
     padding: 1em;
    margin: 1em 0;
    border-radius: 8px;
    border-left: 5px solid;
}
 
.begonia-alert.info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #0d47a1;
}
 
.begonia-alert.warning {
    background-color: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}
 
.begonia-alert.success {
    background-color: #e8f5e9;
    border-color: var(--begonia-green);
    color: #1b5e20;
}


/* 5. Category Links */
    /* Adjust font sizes if necessary */
#catlinks {
    h1 { font-size: 1.8em; }
    background-color: #fff;
     h2 { font-size: 1.5em; }
     border: 1px solid #eee;
    margin-top: 2em;
    padding: 1em;
    border-radius: 8px;
}
}

Revision as of 08:09, 11 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, h3, h4, h5, h6 {
    color: #2c4c3b; /* A nice botanical dark green */
    border-bottom: 1px solid #eaecf0;
    padding-bottom: 0.3em;
}

/* Infobox styling - Standard Desktop (and default) */
.infobox {
    border: 1px solid #a2a9b1;
    background-color: #f8f9fa;
    color: black;
    margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    float: right;
    clear: right;
    width: 300px; /* Fixed width on desktop */
    font-size: 90%;
    line-height: 1.5;
}

/* Clearfix for floats if needed, though MW usually handles this */
.mw-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Internal infobox table styling (simulated based on typical MW infoboxes) */
.infobox table {
    width: 100%;
    border-collapse: collapse;
}

.infobox th {
    background-color: #e6f2e6; /* Light green header */
    text-align: center;
    padding: 0.5em;
}

.infobox td {
    padding: 0.4em;
}

.infobox img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

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

    /* Stack the infobox on top or bottom, remove float */
    .infobox {
        float: none;
        clear: both;
        width: 100%; /* Full width on mobile */
        margin: 0 0 1em 0; /* Add bottom margin to separate from text */
        box-sizing: border-box; /* Ensure padding doesn't overflow width */
    }

    /* Adjust font sizes if necessary */
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
}