MediaWiki:Common.css: Difference between revisions

From Toon Wiki
(Add wiki styling)
 
(Add comprehensive modern styling with family tree and mobile support)
Line 1: Line 1:
/* Toon Wiki Custom Styles */
/* ============================================
  TOON WIKI - MODERN RESPONSIVE STYLING
  ============================================ */
 
/* ===== CSS Variables ===== */
: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;
}
 
/* ===== Base Improvements ===== */
.mw-parser-output {
    line-height: 1.7;
    font-size: 16px;
}
.mw-parser-output p {
    margin-bottom: 1em;
}
.mw-body-content a:not(.new) {
    color: var(--tw-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--tw-transition);
}
.mw-body-content a:not(.new):hover {
    border-bottom-color: var(--tw-link);
}
a.new {
    color: var(--tw-link-new);
}


/* ===== Quote Templates ===== */
/* ===== Quote Templates ===== */
.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 {
    transform: translateY(-2px);
}
.quote a {
.quote a {
     color: inherit !important;
     color: inherit !important;
}
}
.quote_link_color a {
.quote_link_color a,
    color: #fff !important;
    text-decoration: underline;
}
.quote_link_color a:hover {
    color: #ddd !important;
}
.quote_link_color_light a {
.quote_link_color_light a {
    color: #333 !important;
     text-decoration: underline;
     text-decoration: underline;
}
}


/* ===== Infobox Styles ===== */
/* ===== Infobox Styles ===== */
.infobox {
.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: #333;
     color: var(--tw-text);
}
}
.character-infobox td {
.character-infobox td {
     color: #444;
     color: #444;
}
}
.character-infobox a.new {
.character-infobox img {
     color: #ba0000;
     max-width: 100%;
    height: auto;
}
}


/* ===== Content Improvements ===== */
/* ===== Family Tree Styles ===== */
.mw-parser-output {
.familytree {
     line-height: 1.65;
    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);
}
.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 {
    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;
    transform: scale(1.05);
}
}
.mw-parser-output p {
.family-tree-element a {
     margin-bottom: 0.8em;
     color: inherit !important;
    text-decoration: none !important;
}
}


Line 43: Line 145:
figure.mw-halign-left,
figure.mw-halign-left,
figure.mw-halign-right {
figure.mw-halign-right {
     margin: 0.5em 1em 0.5em 0;
     border-radius: var(--tw-radius);
    overflow: hidden;
    box-shadow: var(--tw-shadow);
    transition: transform var(--tw-transition);
}
}
figure.mw-halign-right {
figure.mw-halign-left:hover,
     margin: 0.5em 0 0.5em 1em;
figure.mw-halign-right:hover {
     transform: translateY(-4px);
}
}
figure figcaption {
figure figcaption {
     font-size: 0.9em;
     font-size: 0.9em;
     color: #555;
     color: var(--tw-text-muted);
     padding: 4px 8px;
     padding: 8px 12px;
     background: #f8f9fa;
     background: var(--tw-secondary);
    border: 1px solid #c8ccd1;
    border-top: none;
     text-align: center;
     text-align: center;
}
figure img {
    display: block;
    max-width: 100%;
    height: auto;
}
}


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


/* ===== Section Headers ===== */
/* ===== Section Headers ===== */
.mw-headline {
h2 {
     border-bottom: 1px solid #c8ccd1;
     border-bottom: 3px solid var(--tw-primary);
     padding-bottom: 0.3em;
     padding-bottom: 0.5em;
    margin-top: 2em;
}
}
h2 .mw-headline {
h2 .mw-headline {
     font-size: 1.4em;
    color: var(--tw-primary);
     color: #1a4d7a;
     font-size: 1.5em;
     border-bottom: none;
}
}
h3 .mw-headline {
h3 .mw-headline {
     font-size: 1.15em;
    color: var(--tw-primary-light);
     color: #2c5aa0;
     font-size: 1.2em;
     border-bottom: none;
}
 
/* ===== TOC Improvements ===== */
.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;
}
.toctitle h2 {
    border: none;
    margin: 0 0 0.5em 0;
}
}


/* ===== Imported Content Notice ===== */
/* ===== Imported Content Notice ===== */
.imported-content-notice {
.mw-parser-output > div:first-child {
     background: linear-gradient(135deg, #f8f9fa, #eaecf0);
     border-radius: var(--tw-radius);
     border-left: 4px solid #1a4d7a;
     border-left: 4px solid var(--tw-primary);
}
}


/* ===== Reference Styling ===== */
/* ===== Reference Styling ===== */
.reference {
.reference {
     font-size: 0.85em;
     font-size: 0.8em;
     vertical-align: super;
     vertical-align: super;
     line-height: 0;
     line-height: 0;
Line 111: Line 237:
.references {
.references {
     font-size: 0.9em;
     font-size: 0.9em;
     color: #555;
     color: var(--tw-text-muted);
    background: var(--tw-secondary);
    padding: 1em;
    border-radius: var(--tw-radius);
    margin-top: 2em;
}
.references li {
    margin-bottom: 0.5em;
}
}


/* ===== Category Links ===== */
/* ===== Category Links ===== */
#catlinks {
#catlinks {
     background: #f8f9fa;
     background: linear-gradient(135deg, #fff, var(--tw-secondary));
     border: 1px solid #c8ccd1;
     border: 1px solid var(--tw-border);
    border-radius: var(--tw-radius);
    padding: 1em 1.5em;
    margin-top: 3em;
    box-shadow: var(--tw-shadow);
}
 
/* ===== Icons Template ===== */
#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);
}
 
/* ===== Main article template ===== */
.mw-parser-output > div[style*="font-style: italic"] {
    background: var(--tw-secondary);
    padding: 8px 16px;
    border-radius: var(--tw-radius);
    border-left: 4px solid var(--tw-primary);
    margin: 1em 0;
}
 
/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}
 
/* ============================================
  MOBILE RESPONSIVE DESIGN
  ============================================ */
@media screen and (max-width: 768px) {
    .mw-parser-output {
        font-size: 15px;
        line-height: 1.6;
    }
   
    /* Stack infobox on mobile */
    .infobox,
    .character-infobox {
        float: none !important;
        width: 100% !important;
        margin: 1em 0 !important;
    }
   
    /* Stack images on mobile */
    figure.mw-halign-left,
    figure.mw-halign-right {
        float: none !important;
        margin: 1em 0 !important;
        max-width: 100%;
    }
   
    /* Full-width quotes on mobile */
    .quote {
        margin: 1em 0 !important;
        max-width: 100%;
    }
   
    /* Icons wrap on mobile */
    #icons {
        float: none;
        margin: 0 0 1em 0;
        flex-wrap: wrap;
        justify-content: center;
    }
   
    /* TOC full width on mobile */
    .toc {
        max-width: 100%;
    }
   
    /* Family tree scroll on mobile */
    .familytree {
        display: block;
        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 & ADDICTIVE FEATURES
  ============================================ */
 
/* 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;
     border-radius: 4px;
    padding: 0.5em 1em;
    margin-top: 2em;
}
}


/* ===== Red Links ===== */
/* Engaging hover effects */
a.new {
.mw-body-content a:not(.new):not(.reference):hover {
     color: #ba0000;
     background: rgba(26, 77, 122, 0.1);
    border-radius: 2px;
    padding: 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);
}
}
a.new:hover {
.mw-parser-output h2 + p:hover,
     color: #d33;
.mw-parser-output h3 + p:hover {
     border-left-color: var(--tw-primary);
}
}


/* ===== Icons Template ===== */
/* Animated list items */
#icons {
.mw-parser-output ul li,
     float: right;
.mw-parser-output ol li {
    margin: 0 0 0.5em 1em;
     transition: transform var(--tw-transition);
    padding: 4px 8px;
}
    background: #f8f9fa;
.mw-parser-output ul li:hover,
     border: 1px solid #c8ccd1;
.mw-parser-output ol li:hover {
    border-radius: 4px;
     transform: translateX(4px);
}
}
#icons img {
 
    margin: 0 2px;
/* Dark mode prep (can be enabled later) */
     vertical-align: middle;
@media (prefers-color-scheme: dark) {
     /* Variables can be overridden here for dark mode */
}
}

Revision as of 22:50, 22 December 2025

/* ============================================
   TOON WIKI - MODERN RESPONSIVE STYLING
   ============================================ */

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

/* ===== Base Improvements ===== */
.mw-parser-output {
    line-height: 1.7;
    font-size: 16px;
}
.mw-parser-output p {
    margin-bottom: 1em;
}
.mw-body-content a:not(.new) {
    color: var(--tw-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--tw-transition);
}
.mw-body-content a:not(.new):hover {
    border-bottom-color: var(--tw-link);
}
a.new {
    color: var(--tw-link-new);
}

/* ===== Quote Templates ===== */
.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 {
    transform: translateY(-2px);
}
.quote a {
    color: inherit !important;
}
.quote_link_color a,
.quote_link_color_light a {
    text-decoration: underline;
}

/* ===== Infobox Styles ===== */
.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;
}
.character-infobox th {
    font-weight: 600;
    color: var(--tw-text);
}
.character-infobox td {
    color: #444;
}
.character-infobox img {
    max-width: 100%;
    height: auto;
}

/* ===== Family Tree Styles ===== */
.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);
}
.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 {
    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;
    transform: scale(1.05);
}
.family-tree-element a {
    color: inherit !important;
    text-decoration: none !important;
}

/* ===== Image Improvements ===== */
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;
}
figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== Gallery Improvements ===== */
.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;
    border-bottom: none;
}
h3 .mw-headline {
    color: var(--tw-primary-light);
    font-size: 1.2em;
}

/* ===== TOC Improvements ===== */
.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;
}
.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 ===== */
.reference {
    font-size: 0.8em;
    vertical-align: super;
    line-height: 0;
}
.references {
    font-size: 0.9em;
    color: var(--tw-text-muted);
    background: var(--tw-secondary);
    padding: 1em;
    border-radius: var(--tw-radius);
    margin-top: 2em;
}
.references li {
    margin-bottom: 0.5em;
}

/* ===== Category Links ===== */
#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 Template ===== */
#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);
}

/* ===== Main article template ===== */
.mw-parser-output > div[style*="font-style: italic"] {
    background: var(--tw-secondary);
    padding: 8px 16px;
    border-radius: var(--tw-radius);
    border-left: 4px solid var(--tw-primary);
    margin: 1em 0;
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ============================================
   MOBILE RESPONSIVE DESIGN
   ============================================ */
@media screen and (max-width: 768px) {
    .mw-parser-output {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Stack infobox on mobile */
    .infobox,
    .character-infobox {
        float: none !important;
        width: 100% !important;
        margin: 1em 0 !important;
    }
    
    /* Stack images on mobile */
    figure.mw-halign-left,
    figure.mw-halign-right {
        float: none !important;
        margin: 1em 0 !important;
        max-width: 100%;
    }
    
    /* Full-width quotes on mobile */
    .quote {
        margin: 1em 0 !important;
        max-width: 100%;
    }
    
    /* Icons wrap on mobile */
    #icons {
        float: none;
        margin: 0 0 1em 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* TOC full width on mobile */
    .toc {
        max-width: 100%;
    }
    
    /* Family tree scroll on mobile */
    .familytree {
        display: block;
        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 & ADDICTIVE FEATURES
   ============================================ */

/* 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 {
    background: rgba(26, 77, 122, 0.1);
    border-radius: 2px;
    padding: 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 */
}