MediaWiki:Common.css: Difference between revisions

From Begonia Wiki

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


 
/* Base styles for the content area to ensure readability */
 
.mw-body {
 
    font-family: sans-serif;
/* Import a modern Font from Google (Optional but recommended) */
    line-height: 1.6;
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');
    color: #333;
 
     max-width: 100%;
:root {
     overflow-x: hidden;
     --begonia-green: #2d5a27;
     /* Prevent horizontal scroll on small screens */
     /* Deep leaf green */
     padding: 0 10px;
    --begonia-light-green: #e9f5e8;
     /* Add some side padding on mobile */
     /* 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 */
/* Headings */
h1,
h1,
h2,
h2 {
h3,
     border-bottom: 4px solid #3a5f0b !important;
.firstHeading {
    /* Thick botanical green line */
    font-family: 'Playfair Display', serif;
     background-image: linear-gradient(to right, #E9FCE9, white);
    font-weight: 700;
     border-radius: 8px 8px 0 0;
    color: var(--begonia-green);
     /* Rounds the top-left and top-right corners */
     border-bottom: none !important;
    padding-bottom: 5px;
}
    /* Space between text and line */
 
    margin-top: 1.5em;
/* Main content container */
     /* Space above the header */
#content,
.mw-body {
     border: none !important;
    border-radius: 12px;
    box-shadow: var(--shadow);
     padding: 2em !important;
     margin-top: 20px !important;
}
 
/* 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 */
/* Optional: Make Level 3 Headers (sub-headers) slightly thicker too */
.medik-sidebar .nav-link {
h3 {
     color: #555 !important;
     border-bottom: 2px solid #5e8c31 !important;
     transition: all 0.2s ease;
     /* Slightly thinner green line */
     border-radius: 4px;
    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;
}
}


.medik-sidebar .nav-link:hover {
h4 {
     background-color: var(--begonia-light-green) !important;
     border-bottom: 1.5px solid #5e8c31 !important;
     color: var(--begonia-green) !important;
     /* Slightly thinner green line */
     padding-left: 15px;
    background-image: linear-gradient(to right, #E9FCE9, white);
     /* Slight slide effect */
     border-radius: 8px 8px 0 0;
     /* Rounds the top-left and top-right corners */
    padding-bottom: 3px;
}
}


/* Active link indicator */
h5,
.medik-sidebar .active>.nav-link {
h6 {
     color: var(--begonia-green) !important;
     color: #2c4c3b;
     font-weight: bold;
    /* A nice botanical dark green */
     border-left: 4px solid var(--begonia-accent);
     border-bottom: 1px solid #eaecf0;
     padding-bottom: 0.3em;
}
}


/* Modernize standard Wikitables */
/* Infobox styling - Matching user's provided inline styles but as classes */
.wikitable {
/* We maintain specific overrides to ensure consistency even if inline styles are missing */
     border-collapse: collapse;
.infobox {
     border: none !important;
     border: 1px solid #2e5a27;
     background-color: white !important;
    background-color: #f9fff9;
     box-shadow: var(--shadow);
    color: black;
     margin: 1em 0;
    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;
     overflow: hidden;
     overflow: hidden;
     /* Ensures rounded corners work */
     box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}
 
.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) {
    background-color: #f9f9f9;
}
 
/* Link color */
a {
    color: #1a73e8;
    /* A cleaner blue */
    text-decoration: none;
}
 
a:hover {
    color: var(--begonia-accent);
    text-decoration: underline;
}
}


/* External links icon color */
/* Header style from user template */
a.external {
.infobox-header {
    color: var(--begonia-green);
     background-color: #2e5a27;
}
 
.begonia-hero {
     background: linear-gradient(135deg, var(--begonia-green), #4a7c44);
     color: white;
     color: white;
     padding: 40px;
     padding: 10px;
    border-radius: 12px;
     text-align: center;
     text-align: center;
     margin-bottom: 30px;
     font-size: 1.2em;
    font-weight: bold;
    font-style: italic;
}
}


.begonia-hero h1 {
/* Image area style */
     color: white !important;
.infobox-image {
     margin-top: 0;
     text-align: center;
    background-color: white;
     border-bottom: 1px solid #ddd;
    padding: 5px;
}
}


/* --- ENHANCED UI ELEMENTS --- */
/* Table styles */
 
.infobox table {
/* 1. Modern Table of Contents */
     width: 100%;
#toc,
     border-collapse: collapse;
.toc {
     background: transparent;
     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,
.infobox th {
.toc h2 {
     text-align: left;
     font-family: 'Playfair Display', serif;
     padding: 8px;
     font-size: 1.4em;
     background: #eef7ee;
     color: var(--begonia-green);
     /* User's light green */
     border-bottom: 2px solid var(--begonia-light-green);
     width: 40%;
     padding-bottom: 0.5em;
     border-bottom: 1px solid #eee;
     margin-bottom: 0.5em;
}
}


#toc ul,
.infobox td {
.toc ul {
     padding: 8px;
     list-style-type: none;
     border-bottom: 1px solid #eee;
     padding-left: 0;
}
}


#toc li,
/* Clearfix */
.toc li {
.mw-body::after {
     padding: 4px 0;
     content: "";
    display: table;
    clear: both;
}
}


/* 2. Forms & Inputs */
/* Mobile Responsiveness */
input[type="text"],
@media screen and (max-width: 720px) {
input[type="search"],
     .mw-body {
textarea,
        padding: 0 15px;
#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,
     /* Force mobile override even if inline styles exist */
input[type="search"]:focus,
    .infobox {
textarea:focus,
        float: none !important;
#searchInput:focus {
        clear: both !important;
    border-color: var(--begonia-green);
        width: 100% !important;
     outline: none;
        /* Full width on mobile */
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
        margin: 0 0 1em 0 !important;
}
        /* Add bottom margin, remove left margin */
 
        box-shadow: none;
/* Buttons */
        /* Optional: simpler look on mobile */
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 */
#catlinks {
     background-color: #fff;
    border: 1px solid #eee;
    margin-top: 2em;
    padding: 1em;
    border-radius: 8px;
}
}

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 */
    }
}