MediaWiki:Common.css

From Toon Wiki
Revision as of 23:01, 22 December 2025 by Admin (talk | contribs) (Add tabbed gallery, better quotes, navigation styles)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* ============================================
   TOON WIKI - MODERN RESPONSIVE STYLING v2
   ============================================ */

:root {
    --tw-primary: #1a4d7a;
    --tw-primary-light: #2c5aa0;
    --tw-secondary: #f8f9fa;
    --tw-border: #c8ccd1;
    --tw-text: #202122;
    --tw-text-muted: #72777d;
    --tw-link: #0645ad;
    --tw-link-new: #ba0000;
    --tw-air: #FF9900;
    --tw-water: #003399;
    --tw-earth: #006633;
    --tw-fire: #AA0000;
    --tw-radius: 8px;
    --tw-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --tw-transition: 0.2s ease;
}

/* ===== Quote Box Styling ===== */
.quote-box {
    transition: transform var(--tw-transition), box-shadow var(--tw-transition);
}
.quote-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.quote-box a {
    color: inherit !important;
    text-decoration: underline;
}
.quote-air { background: linear-gradient(135deg, #FF9900, #FF6600) !important; }
.quote-water { background: linear-gradient(135deg, #0066CC, #003399) !important; }
.quote-earth { background: linear-gradient(135deg, #228B22, #006633) !important; }
.quote-fire { background: linear-gradient(135deg, #CC0000, #8B0000) !important; }

/* ===== Infobox Gallery Tabs ===== */
.infobox-image .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}
.infobox-image .gallerybox {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    border: none;
    border-radius: 0;
    margin: 0;
    background: #f0f0f0;
    transition: all var(--tw-transition);
    cursor: pointer;
}
.infobox-image .gallerybox:hover {
    background: #e0e0e0;
    transform: none;
    box-shadow: none;
}
.infobox-image .gallerybox:first-child {
    border-radius: 8px 0 0 8px;
}
.infobox-image .gallerybox:last-child {
    border-radius: 0 8px 8px 0;
}
.infobox-image .gallerybox .thumb {
    height: 100px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}
.infobox-image .gallerybox img {
    max-height: 90px;
    width: auto;
    border-radius: 4px;
}
.infobox-image .gallerytext {
    background: transparent;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--tw-primary);
    padding: 4px;
}

/* ===== Infobox Improvements ===== */
.character-infobox {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.character-infobox th {
    font-weight: 600;
    color: #333;
    vertical-align: top;
}
.character-infobox td {
    color: #444;
    vertical-align: top;
}
.character-infobox ul {
    margin: 0;
    padding-left: 16px;
}
.character-infobox li {
    margin: 2px 0;
}

/* ===== Base Improvements ===== */
.mw-parser-output {
    line-height: 1.7;
    font-size: 16px;
}
.mw-parser-output p {
    margin-bottom: 1em;
}
a.new {
    color: var(--tw-link-new);
}

/* ===== Family Tree ===== */
.familytree {
    margin: 1.5em 0;
    padding: 1em;
    background: linear-gradient(135deg, #fafbfc, #f0f2f5);
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    overflow-x: auto;
    box-shadow: var(--tw-shadow);
}
.family-tree-element {
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--tw-primary);
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all var(--tw-transition);
}
.family-tree-element:hover {
    background: var(--tw-primary);
    color: white;
}
.family-tree-line-solid-right { border-right: 2px solid #666; }
.family-tree-line-solid-bottom { border-bottom: 2px solid #666; }
.family-tree-line-dashed-right { border-right: 2px dashed #999; }
.family-tree-line-dashed-bottom { border-bottom: 2px dashed #999; }

/* ===== Images ===== */
figure.mw-halign-left,
figure.mw-halign-right {
    border-radius: var(--tw-radius);
    overflow: hidden;
    box-shadow: var(--tw-shadow);
    transition: transform var(--tw-transition);
}
figure.mw-halign-left:hover,
figure.mw-halign-right:hover {
    transform: translateY(-4px);
}
figure figcaption {
    font-size: 0.9em;
    color: var(--tw-text-muted);
    padding: 8px 12px;
    background: var(--tw-secondary);
    text-align: center;
}

/* ===== Gallery ===== */
.gallery {
    margin: 1.5em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.gallerybox {
    background: white;
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    overflow: hidden;
    transition: all var(--tw-transition);
}
.gallerybox:hover {
    box-shadow: var(--tw-shadow);
    transform: translateY(-4px);
}
.gallerytext {
    font-size: 0.85em;
    padding: 8px;
    text-align: center;
    background: var(--tw-secondary);
}

/* ===== Section Headers ===== */
h2 {
    border-bottom: 3px solid var(--tw-primary);
    padding-bottom: 0.5em;
    margin-top: 2em;
}
h2 .mw-headline {
    color: var(--tw-primary);
    font-size: 1.5em;
}
h3 .mw-headline {
    color: var(--tw-primary-light);
    font-size: 1.2em;
}

/* ===== TOC ===== */
.toc {
    background: linear-gradient(135deg, #fff, var(--tw-secondary));
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    padding: 1.5em;
    box-shadow: var(--tw-shadow);
    max-width: 400px;
}

/* ===== References ===== */
.references {
    font-size: 0.9em;
    color: var(--tw-text-muted);
    background: var(--tw-secondary);
    padding: 1em;
    border-radius: var(--tw-radius);
    margin-top: 2em;
}

/* ===== Categories ===== */
#catlinks {
    background: linear-gradient(135deg, #fff, var(--tw-secondary));
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    padding: 1em 1.5em;
    margin-top: 3em;
    box-shadow: var(--tw-shadow);
}

/* ===== Icons ===== */
#icons {
    float: right;
    margin: 0 0 1em 1em;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    box-shadow: var(--tw-shadow);
    display: flex;
    gap: 4px;
    align-items: center;
}
#icons img {
    transition: transform var(--tw-transition);
}
#icons img:hover {
    transform: scale(1.2);
}

/* ===== Sidebar Navigation ===== */
#mw-panel .vector-menu-content-list {
    padding: 0;
}
#mw-panel .vector-menu-content-list li a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background var(--tw-transition);
}
#mw-panel .vector-menu-content-list li a:hover {
    background: rgba(26, 77, 122, 0.1);
}

/* ===== Mobile Responsive ===== */
@media screen and (max-width: 768px) {
    .mw-parser-output {
        font-size: 15px;
    }
    .infobox, .character-infobox {
        float: none !important;
        width: 100% !important;
        margin: 1em 0 !important;
    }
    figure.mw-halign-left,
    figure.mw-halign-right {
        float: none !important;
        margin: 1em 0 !important;
        max-width: 100%;
    }
    .quote-box {
        margin: 1em 0 !important;
        max-width: 100%;
    }
    #icons {
        float: none;
        margin: 0 0 1em 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    .toc {
        max-width: 100%;
    }
    .familytree {
        display: block;
        overflow-x: auto;
    }
}

/* ===== Engagement Features ===== */
html {
    scroll-behavior: smooth;
}
.mw-body-content a:not(.new):not(.reference):hover {
    background: rgba(26, 77, 122, 0.1);
    border-radius: 2px;
    padding: 0 2px;
    margin: 0 -2px;
}