MediaWiki:Common.css: Difference between revisions

From Toon Wiki
(Add comprehensive modern styling with family tree and mobile support)
(Add tabbed gallery, better quotes, navigation styles)
Line 1: Line 1:
/* ============================================
/* ============================================
   TOON WIKI - MODERN RESPONSIVE STYLING
   TOON WIKI - MODERN RESPONSIVE STYLING v2
   ============================================ */
   ============================================ */


/* ===== CSS Variables ===== */
:root {
:root {
     --tw-primary: #1a4d7a;
     --tw-primary: #1a4d7a;
Line 22: Line 21:
}
}


/* ===== Base Improvements ===== */
/* ===== Quote Box Styling ===== */
.mw-parser-output {
.quote-box {
     line-height: 1.7;
    transition: transform var(--tw-transition), box-shadow var(--tw-transition);
     font-size: 16px;
}
.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;
}
}
.mw-parser-output p {
.quote-air { background: linear-gradient(135deg, #FF9900, #FF6600) !important; }
     margin-bottom: 1em;
.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;
}
}
.mw-body-content a:not(.new) {
.infobox-image .gallerybox {
     color: var(--tw-link);
     flex: 1;
     text-decoration: none;
    min-width: 120px;
     border-bottom: 1px solid transparent;
    max-width: 150px;
     transition: border-color var(--tw-transition);
     border: none;
     border-radius: 0;
    margin: 0;
    background: #f0f0f0;
     transition: all var(--tw-transition);
    cursor: pointer;
}
}
.mw-body-content a:not(.new):hover {
.infobox-image .gallerybox:hover {
     border-bottom-color: var(--tw-link);
     background: #e0e0e0;
    transform: none;
    box-shadow: none;
}
}
a.new {
.infobox-image .gallerybox:first-child {
     color: var(--tw-link-new);
     border-radius: 8px 0 0 8px;
}
}
 
.infobox-image .gallerybox:last-child {
/* ===== Quote Templates ===== */
     border-radius: 0 8px 8px 0;
.quote {
     border-radius: var(--tw-radius) !important;
    box-shadow: var(--tw-shadow);
    margin: 1.5em auto !important;
    max-width: 600px;
    font-size: 1.05em;
    transition: transform var(--tw-transition);
}
}
.quote:hover {
.infobox-image .gallerybox .thumb {
     transform: translateY(-2px);
    height: 100px !important;
     display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}
}
.quote a {
.infobox-image .gallerybox img {
     color: inherit !important;
     max-height: 90px;
    width: auto;
    border-radius: 4px;
}
}
.quote_link_color a,
.infobox-image .gallerytext {
.quote_link_color_light a {
    background: transparent;
     text-decoration: underline;
    font-size: 0.8em;
    font-weight: 600;
     color: var(--tw-primary);
    padding: 4px;
}
}


/* ===== Infobox Styles ===== */
/* ===== Infobox Improvements ===== */
.infobox,
.character-infobox {
.character-infobox {
    border-radius: var(--tw-radius) !important;
    box-shadow: var(--tw-shadow);
    overflow: hidden;
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
}
.character-infobox th {
.character-infobox th {
     font-weight: 600;
     font-weight: 600;
     color: var(--tw-text);
     color: #333;
    vertical-align: top;
}
}
.character-infobox td {
.character-infobox td {
     color: #444;
     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;
}
}
.character-infobox img {
.mw-parser-output p {
     max-width: 100%;
     margin-bottom: 1em;
     height: auto;
}
a.new {
     color: var(--tw-link-new);
}
}


/* ===== Family Tree Styles ===== */
/* ===== Family Tree ===== */
.familytree {
.familytree {
     margin: 1.5em 0;
     margin: 1.5em 0;
Line 92: Line 131:
     overflow-x: auto;
     overflow-x: auto;
     box-shadow: var(--tw-shadow);
     box-shadow: var(--tw-shadow);
}
.familytree table {
    border-collapse: collapse;
}
.family-tree-table-cell {
    padding: 0;
    vertical-align: middle;
}
.family-tree-line-table {
    width: 30px;
    border-collapse: collapse;
}
.family-tree-line {
    width: 15px;
    height: 15px;
    background: transparent;
}
.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;
}
}
.family-tree-element {
.family-tree-element {
Line 135: Line 146:
     background: var(--tw-primary);
     background: var(--tw-primary);
     color: white;
     color: white;
    transform: scale(1.05);
}
.family-tree-element a {
    color: inherit !important;
    text-decoration: none !important;
}
}
.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; }


/* ===== Image Improvements ===== */
/* ===== Images ===== */
figure.mw-halign-left,
figure.mw-halign-left,
figure.mw-halign-right {
figure.mw-halign-right {
Line 160: Line 170:
     background: var(--tw-secondary);
     background: var(--tw-secondary);
     text-align: center;
     text-align: center;
}
figure img {
    display: block;
    max-width: 100%;
    height: auto;
}
}


/* ===== Gallery Improvements ===== */
/* ===== Gallery ===== */
.gallery {
.gallery {
     margin: 1.5em 0;
     margin: 1.5em 0;
Line 202: Line 207:
     color: var(--tw-primary);
     color: var(--tw-primary);
     font-size: 1.5em;
     font-size: 1.5em;
    border-bottom: none;
}
}
h3 .mw-headline {
h3 .mw-headline {
Line 209: Line 213:
}
}


/* ===== TOC Improvements ===== */
/* ===== TOC ===== */
.toc {
.toc {
     background: linear-gradient(135deg, #fff, var(--tw-secondary));
     background: linear-gradient(135deg, #fff, var(--tw-secondary));
Line 217: Line 221:
     box-shadow: var(--tw-shadow);
     box-shadow: var(--tw-shadow);
     max-width: 400px;
     max-width: 400px;
}
.toctitle h2 {
    border: none;
    margin: 0 0 0.5em 0;
}
/* ===== Imported Content Notice ===== */
.mw-parser-output > div:first-child {
    border-radius: var(--tw-radius);
    border-left: 4px solid var(--tw-primary);
}
}


/* ===== Reference Styling ===== */
/* ===== References ===== */
.reference {
    font-size: 0.8em;
    vertical-align: super;
    line-height: 0;
}
.references {
.references {
     font-size: 0.9em;
     font-size: 0.9em;
Line 242: Line 231:
     border-radius: var(--tw-radius);
     border-radius: var(--tw-radius);
     margin-top: 2em;
     margin-top: 2em;
}
.references li {
    margin-bottom: 0.5em;
}
}


/* ===== Category Links ===== */
/* ===== Categories ===== */
#catlinks {
#catlinks {
     background: linear-gradient(135deg, #fff, var(--tw-secondary));
     background: linear-gradient(135deg, #fff, var(--tw-secondary));
Line 257: Line 243:
}
}


/* ===== Icons Template ===== */
/* ===== Icons ===== */
#icons {
#icons {
     float: right;
     float: right;
Line 277: Line 263:
}
}


/* ===== Main article template ===== */
/* ===== Sidebar Navigation ===== */
.mw-parser-output > div[style*="font-style: italic"] {
#mw-panel .vector-menu-content-list {
     background: var(--tw-secondary);
     padding: 0;
     padding: 8px 16px;
}
     border-radius: var(--tw-radius);
#mw-panel .vector-menu-content-list li a {
     border-left: 4px solid var(--tw-primary);
     padding: 8px 12px;
    margin: 1em 0;
     border-radius: 4px;
     transition: background var(--tw-transition);
}
}
 
#mw-panel .vector-menu-content-list li a:hover {
/* ===== Smooth Scrolling ===== */
     background: rgba(26, 77, 122, 0.1);
html {
     scroll-behavior: smooth;
}
}


/* ============================================
/* ===== Mobile Responsive ===== */
  MOBILE RESPONSIVE DESIGN
  ============================================ */
@media screen and (max-width: 768px) {
@media screen and (max-width: 768px) {
     .mw-parser-output {
     .mw-parser-output {
         font-size: 15px;
         font-size: 15px;
        line-height: 1.6;
     }
     }
   
     .infobox, .character-infobox {
    /* Stack infobox on mobile */
     .infobox,
    .character-infobox {
         float: none !important;
         float: none !important;
         width: 100% !important;
         width: 100% !important;
         margin: 1em 0 !important;
         margin: 1em 0 !important;
     }
     }
   
    /* Stack images on mobile */
     figure.mw-halign-left,
     figure.mw-halign-left,
     figure.mw-halign-right {
     figure.mw-halign-right {
Line 315: Line 292:
         max-width: 100%;
         max-width: 100%;
     }
     }
   
     .quote-box {
    /* Full-width quotes on mobile */
     .quote {
         margin: 1em 0 !important;
         margin: 1em 0 !important;
         max-width: 100%;
         max-width: 100%;
     }
     }
   
    /* Icons wrap on mobile */
     #icons {
     #icons {
         float: none;
         float: none;
Line 329: Line 302:
         justify-content: center;
         justify-content: center;
     }
     }
   
    /* TOC full width on mobile */
     .toc {
     .toc {
         max-width: 100%;
         max-width: 100%;
     }
     }
   
    /* Family tree scroll on mobile */
     .familytree {
     .familytree {
         display: block;
         display: block;
         overflow-x: auto;
         overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
   
    /* Better touch targets */
    a {
        padding: 2px 0;
    }
   
    /* Larger section headers on mobile */
    h2 {
        font-size: 1.4em;
    }
    h3 {
        font-size: 1.2em;
     }
     }
}
}


/* ============================================
/* ===== Engagement Features ===== */
  ENGAGEMENT & ADDICTIVE FEATURES
html {
  ============================================ */
     scroll-behavior: smooth;
 
/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}
img[loading] {
    opacity: 0;
}
 
/* Reading progress indicator */
.mw-parser-output::before {
     content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tw-air), var(--tw-water), var(--tw-earth), var(--tw-fire));
    z-index: 9999;
    animation: none;
}
}
/* Highlight current section in TOC */
.vector-toc-link:hover {
    background: var(--tw-secondary);
    border-radius: 4px;
}
/* Engaging hover effects */
.mw-body-content a:not(.new):not(.reference):hover {
.mw-body-content a:not(.new):not(.reference):hover {
     background: rgba(26, 77, 122, 0.1);
     background: rgba(26, 77, 122, 0.1);
Line 394: Line 320:
     padding: 0 2px;
     padding: 0 2px;
     margin: 0 -2px;
     margin: 0 -2px;
}
/* Card-like sections */
.mw-parser-output h2 + p,
.mw-parser-output h3 + p {
    padding-left: 0.5em;
    border-left: 2px solid transparent;
    transition: border-color var(--tw-transition);
}
.mw-parser-output h2 + p:hover,
.mw-parser-output h3 + p:hover {
    border-left-color: var(--tw-primary);
}
/* Animated list items */
.mw-parser-output ul li,
.mw-parser-output ol li {
    transition: transform var(--tw-transition);
}
.mw-parser-output ul li:hover,
.mw-parser-output ol li:hover {
    transform: translateX(4px);
}
/* Dark mode prep (can be enabled later) */
@media (prefers-color-scheme: dark) {
    /* Variables can be overridden here for dark mode */
}
}

Revision as of 23:01, 22 December 2025

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