MediaWiki:Common.css: Difference between revisions
(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 | ||
============================================ */ | ============================================ */ | ||
:root { | :root { | ||
--tw-primary: #1a4d7a; | --tw-primary: #1a4d7a; | ||
| Line 22: | Line 21: | ||
} | } | ||
/* ===== | /* ===== 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; } | ||
margin | .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; | |||
border- | max-width: 150px; | ||
transition: | 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; | |||
. | |||
border-radius: | |||
} | } | ||
. | .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 | /* ===== Infobox Improvements ===== */ | ||
.character-infobox { | .character-infobox { | ||
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: | 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; | |||
} | } | ||
. | .mw-parser-output p { | ||
margin-bottom: 1em; | |||
} | |||
a.new { | |||
color: var(--tw-link-new); | |||
} | } | ||
/* ===== Family Tree | /* ===== 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); | ||
} | } | ||
.family-tree-element { | .family-tree-element { | ||
| Line 135: | Line 146: | ||
background: var(--tw-primary); | background: var(--tw-primary); | ||
color: white; | 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-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; | ||
} | } | ||
/* ===== Gallery | /* ===== 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; | ||
} | } | ||
h3 .mw-headline { | h3 .mw-headline { | ||
| Line 209: | Line 213: | ||
} | } | ||
/* ===== TOC | /* ===== 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; | ||
} | } | ||
/* ===== | /* ===== References ===== */ | ||
.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; | ||
} | } | ||
/* ===== | /* ===== Categories ===== */ | ||
#catlinks { | #catlinks { | ||
background: linear-gradient(135deg, #fff, var(--tw-secondary)); | background: linear-gradient(135deg, #fff, var(--tw-secondary)); | ||
| Line 257: | Line 243: | ||
} | } | ||
/* ===== Icons | /* ===== Icons ===== */ | ||
#icons { | #icons { | ||
float: right; | float: right; | ||
| Line 277: | Line 263: | ||
} | } | ||
/* ===== | /* ===== Sidebar Navigation ===== */ | ||
. | #mw-panel .vector-menu-content-list { | ||
padding: 0; | |||
padding: 8px | } | ||
border-radius: | #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) { | @media screen and (max-width: 768px) { | ||
.mw-parser-output { | .mw-parser-output { | ||
font-size: 15px; | font-size: 15px; | ||
} | } | ||
.infobox, .character-infobox { | |||
.infobox, | |||
float: none !important; | float: none !important; | ||
width: 100% !important; | width: 100% !important; | ||
margin: 1em 0 !important; | margin: 1em 0 !important; | ||
} | } | ||
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 { | |||
.quote { | |||
margin: 1em 0 !important; | margin: 1em 0 !important; | ||
max-width: 100%; | max-width: 100%; | ||
} | } | ||
#icons { | #icons { | ||
float: none; | float: none; | ||
| Line 329: | Line 302: | ||
justify-content: center; | justify-content: center; | ||
} | } | ||
.toc { | .toc { | ||
max-width: 100%; | max-width: 100%; | ||
} | } | ||
.familytree { | .familytree { | ||
display: block; | display: block; | ||
overflow-x: auto; | overflow-x: auto; | ||
} | } | ||
} | } | ||
/* ===== | /* ===== Engagement Features ===== */ | ||
html { | |||
scroll-behavior: smooth; | |||
} | } | ||
.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; | ||
} | } | ||
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;
}