MediaWiki:Common.css: Difference between revisions
From KB Lexicon
No edit summary |
No edit summary |
||
| Line 333: | Line 333: | ||
} | } | ||
/* === | /* === CORE TREE LAYOUT === */ | ||
.kbft-tree { | .kbft-tree { | ||
text-align: center; | text-align: center; | ||
} | } | ||
/* GENERATIONS STACK VERTICALLY */ | |||
.kbft-generation { | .kbft-generation { | ||
margin: 20px 0; | |||
margin: 0 | |||
} | } | ||
.kbft-row { | /* FOCAL ROW = TRUE GRID */ | ||
display: | .kbft-focal-row, | ||
.kbft-desc-row { | |||
display: grid; | |||
justify-content: center; | justify-content: center; | ||
align-items: | align-items: start; | ||
gap: | gap: 24px; | ||
} | } | ||
.kbft- | /* AUTO-COLUMN COUNT BASED ON CONTENT */ | ||
.kbft-focal-row { | |||
grid-auto-flow: column; | |||
grid-auto-columns: minmax(140px, auto); | |||
} | } | ||
.kbft- | .kbft-desc-row { | ||
grid-auto-flow: column; | |||
grid-auto-columns: minmax(140px, auto); | |||
} | } | ||
.kbft- | /* EACH COLUMN */ | ||
.kbft-focal-col, | |||
.kbft-branch-col { | |||
.kbft- | |||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
align-items: center; | align-items: center; | ||
} | } | ||
.kbft- | /* CARDS */ | ||
.kbft-card { | |||
background: #f8f5f0; | |||
border: 1px solid #c8b79f; | |||
border-radius: 10px; | |||
padding: 10px 14px; | |||
min-width: 120px; | |||
box-shadow: 0 2px 4px rgba(0,0,0,0.08); | |||
} | } | ||
.kbft- | /* FOCAL PERSON */ | ||
.kbft-focus-card { | |||
border: 2px solid #a88c5a; | |||
} | } | ||
/* | /* UNION META (Marriage, Affair, etc) */ | ||
.kbft-union-meta { | |||
font-size: 12px; | |||
margin-top: 6px; | |||
.kbft- | margin-bottom: 6px; | ||
color: #6b5a3a; | |||
} | } | ||
/* CONNECTOR LINE DOWN */ | |||
.kbft-child-down { | |||
.kbft- | |||
width: 2px; | width: 2px; | ||
height: | height: 20px; | ||
background: # | background: #b8a98a; | ||
margin: 0 | margin: 6px 0; | ||
} | } | ||
/* | /* CHILD ROW */ | ||
.kbft-children { | |||
.kbft- | |||
display: flex; | display: flex; | ||
gap: 10px; | |||
gap: | |||
flex-wrap: wrap; | flex-wrap: wrap; | ||
justify-content: center; | justify-content: center; | ||
} | } | ||
.kbft- | /* EMPTY META PLACEHOLDER (keeps rows aligned) */ | ||
.kbft-union-meta-empty { | |||
visibility: hidden; | visibility: hidden; | ||
height: 14px; | |||
height: | |||
} | } | ||
Revision as of 14:22, 30 March 2026
/* Layout + float */
.infobox.infobox-character .infobox-table {
width: 100%;
max-width: 320px;
border-collapse: collapse;
background: #fff;
border: 1px solid #ddd;
float: right;
margin: 0 0 1em 1em;
font-size: 0.95rem;
line-height: 1.35;
}
/* Title row */
.infobox.infobox-character .infobox-title {
background: linear-gradient(to right, #f5f5f7, #ece7f1);
color: #111;
font-weight: 700;
text-align: center;
padding: 10px;
border-bottom: 1px solid #ddd;
}
/* Image + caption */
.infobox.infobox-character .infobox-image { text-align: center; padding: 8px; border-bottom: 1px solid #eee; }
.infobox.infobox-character .infobox-image img { max-width: 100%; height: auto; border-radius: 6px; }
.infobox.infobox-character .infobox-caption { color: #666; font-size: 0.85em; margin-top: 4px; }
/* Rows */
.infobox.infobox-character .infobox-label {
width: 42%;
vertical-align: top;
padding: 8px 10px;
background: #fafafa;
color: #333;
border-top: 1px solid #eee;
font-weight: 600;
}
.infobox.infobox-character .infobox-data {
width: 58%;
padding: 8px 10px;
border-top: 1px solid #eee;
}
/* Hide empty rows using :has() */
.infobox.infobox-character tr:has(.infobox-data .val:empty) { display: none; }
/* Hide empty caption block */
.infobox.infobox-character .infobox-image:has(.infobox-caption:empty) .infobox-caption { display: none; }
/* Mobile: stack it */
@media (max-width: 700px) {
.infobox.infobox-character .infobox-table { float: none; margin: 0 auto 1em; }
}
/* ===== UNIVERSAL INFOBOX STYLES ===== */
/* Wrapper floats box to the right */
.mw-parser-output .infobox {
float: right;
margin: 0 0 1em 1em;
clear: right;
max-width: 320px;
font-size: 0.95rem;
line-height: 1.35;
background: #fff;
border: 1px solid #ddd;
}
/* Table basics */
.mw-parser-output .infobox .infobox-table {
width: 100%;
border-collapse: collapse;
background: #fff;
}
/* Title row */
.mw-parser-output .infobox .infobox-title {
background: linear-gradient(to right, #f7f5f5, #f1ece7);
color: #111;
font-weight: 700;
text-align: center;
padding: 10px;
border-bottom: 1px solid #ddd;
font-family: "Georgia", "Times New Roman", serif;
}
/* Image + caption */
.mw-parser-output .infobox .infobox-image {
text-align: center;
padding: 8px;
border-bottom: 1px solid #eee;
}
.mw-parser-output .infobox .infobox-image img {
max-width: 100%;
height: auto;
border-radius: 6px;
}
.mw-parser-output .infobox .infobox-caption {
color: #666;
font-size: 0.85em;
margin-top: 4px;
}
/* Quote (for character boxes) */
.mw-parser-output .infobox .infobox-quote {
font-style: italic;
color: #444;
padding: 10px;
border-bottom: 1px solid #eee;
background: #faf9fb;
}
/* Label + data cells */
.mw-parser-output .infobox .infobox-label {
width: 40%;
vertical-align: top;
padding: 8px 10px;
background: #fafafa;
color: #333;
font-weight: 600;
}
.mw-parser-output .infobox .infobox-data {
width: 60%;
padding: 8px 10px;
}
/* Row dividers */
.mw-parser-output .infobox .infobox-table td,
.mw-parser-output .infobox .infobox-table th {
border-bottom: 1px solid #ddd;
}
.mw-parser-output .infobox .infobox-table tr:last-child td,
.mw-parser-output .infobox .infobox-table tr:last-child th {
border-bottom: none;
}
/* Hide empty rows gracefully */
.mw-parser-output .infobox tr:has(.infobox-data .val:empty) {
display: none;
}
.mw-parser-output .infobox .infobox-image:has(.infobox-caption:empty) .infobox-caption {
display: none;
}
/* Mobile responsiveness */
@media (max-width: 700px) {
.mw-parser-output .infobox {
float: none;
margin: 0 auto 1em;
}
}
/* ----------------------------- */
/* INGREDIENT INFOBOX */
/* ----------------------------- */
.ingredient-infobox {
float: right;
width: 320px;
margin: 0 0 20px 25px;
padding: 0;
background: #f9f5ec; /* warm parchment */
border: 1px solid #8b6f47; /* old gold-brown */
box-shadow: 0 0 6px rgba(0,0,0,0.25);
font-family: Georgia, "Times New Roman", serif;
}
.ingredient-title {
background: #d8c8a5; /* darker parchment header */
color: #3a2d1f;
font-size: 1.25em;
font-weight: bold;
text-align: center;
padding: 10px;
border-bottom: 1px solid #8b6f47;
}
.ingredient-image {
text-align: center;
padding: 10px;
}
.ingredient-table {
width: 100%;
border-collapse: collapse;
font-size: 0.86em;
}
.ingredient-table th {
width: 40%;
text-align: left;
background: #e9dfc9;
padding: 6px 8px;
border-bottom: 1px solid #c6b79b;
color: #3a2d1f;
font-weight: bold;
}
.ingredient-table td {
padding: 6px 8px;
border-bottom: 1px solid #d7cbb4;
color: #2f251a;
}
.ingredient-table tr:last-child td,
.ingredient-table tr:last-child th {
border-bottom: none;
}
/* ---------- THEME VARIANTS FOR INGREDIENT BOXES ---------- */
/* Default (what you already have) */
.ingredient-infobox.ingredient-theme-default {
border-color: #8b6f47;
}
.ingredient-infobox.ingredient-theme-default .ingredient-title {
background: #d8c8a5;
border-bottom-color: #8b6f47;
}
/* Healing / herbal: soft green */
.ingredient-infobox.ingredient-theme-healing,
.ingredient-infobox.ingredient-theme-botanical {
border-color: #5c7e4b;
}
.ingredient-infobox.ingredient-theme-healing .ingredient-title,
.ingredient-infobox.ingredient-theme-botanical .ingredient-title {
background: #cfdcc2;
border-bottom-color: #5c7e4b;
}
/* Poisons / venoms: moody purple-green */
.ingredient-infobox.ingredient-theme-poison {
border-color: #4b2f5c;
}
.ingredient-infobox.ingredient-theme-poison .ingredient-title {
background: linear-gradient(to right, #3c234e, #234031);
color: #f4eefc;
border-bottom-color: #2b1a38;
}
/* Catalysts / amplifiers: rich gold */
.ingredient-infobox.ingredient-theme-catalyst {
border-color: #b6862e;
}
.ingredient-infobox.ingredient-theme-catalyst .ingredient-title {
background: linear-gradient(to right, #f1d48d, #e9b956);
color: #402b0e;
border-bottom-color: #b6862e;
}
/* Dark / necromantic: deep burgundy */
.ingredient-infobox.ingredient-theme-dark {
border-color: #5b1f26;
}
.ingredient-infobox.ingredient-theme-dark .ingredient-title {
background: #7b2e36;
color: #f9f2f3;
border-bottom-color: #5b1f26;
}
/* ---------- FAKE PARCHMENT CURLS ---------- */
.ingredient-infobox {
position: relative;
border-radius: 4px;
overflow: visible; /* let curls peek out */
}
/* bottom-right curl */
.ingredient-infobox::after {
content: "";
position: absolute;
width: 26px;
height: 26px;
right: -1px;
bottom: -1px;
background:
radial-gradient(circle at 0 0, rgba(0,0,0,0.25) 0, rgba(0,0,0,0.25) 40%, transparent 41%) ,
linear-gradient(135deg, #f9f5ec 0, #d8c8a5 60%, #c2aa80 100%);
border-bottom-right-radius: 4px;
box-shadow: -2px -2px 4px rgba(0,0,0,0.25);
transform: translate(4px,4px) rotate(3deg);
pointer-events: none;
}
/* top-left curl */
.ingredient-infobox::before {
content: "";
position: absolute;
width: 22px;
height: 22px;
left: -1px;
top: -1px;
background:
radial-gradient(circle at 100% 100%, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 40%, transparent 41%) ,
linear-gradient(315deg, #f9f5ec 0, #d8c8a5 60%, #c2aa80 100%);
border-top-left-radius: 4px;
box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
transform: translate(-3px,-3px) rotate(-2deg);
pointer-events: none;
}
/* ---------- INGREDIENT CATEGORY HEADER BOX ---------- */
.ingredient-category-header {
background: #f9f5ec;
border: 1px solid #8b6f47;
box-shadow: 0 0 6px rgba(0,0,0,0.25);
padding: 12px 16px;
margin: 0 0 1em 0;
font-family: Georgia, "Times New Roman", serif;
max-width: 720px;
}
/* Let it share the same theme colors as ingredient boxes */
.ingredient-category-header.ingredient-theme-healing,
.ingredient-category-header.ingredient-theme-botanical {
border-color: #5c7e4b;
}
.ingredient-category-header.ingredient-theme-poison {
border-color: #4b2f5c;
}
.ingredient-category-header.ingredient-theme-catalyst {
border-color: #b6862e;
}
.ingredient-category-header.ingredient-theme-dark {
border-color: #5b1f26;
}
/* === CORE TREE LAYOUT === */
.kbft-tree {
text-align: center;
}
/* GENERATIONS STACK VERTICALLY */
.kbft-generation {
margin: 20px 0;
}
/* FOCAL ROW = TRUE GRID */
.kbft-focal-row,
.kbft-desc-row {
display: grid;
justify-content: center;
align-items: start;
gap: 24px;
}
/* AUTO-COLUMN COUNT BASED ON CONTENT */
.kbft-focal-row {
grid-auto-flow: column;
grid-auto-columns: minmax(140px, auto);
}
.kbft-desc-row {
grid-auto-flow: column;
grid-auto-columns: minmax(140px, auto);
}
/* EACH COLUMN */
.kbft-focal-col,
.kbft-branch-col {
display: flex;
flex-direction: column;
align-items: center;
}
/* CARDS */
.kbft-card {
background: #f8f5f0;
border: 1px solid #c8b79f;
border-radius: 10px;
padding: 10px 14px;
min-width: 120px;
box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
/* FOCAL PERSON */
.kbft-focus-card {
border: 2px solid #a88c5a;
}
/* UNION META (Marriage, Affair, etc) */
.kbft-union-meta {
font-size: 12px;
margin-top: 6px;
margin-bottom: 6px;
color: #6b5a3a;
}
/* CONNECTOR LINE DOWN */
.kbft-child-down {
width: 2px;
height: 20px;
background: #b8a98a;
margin: 6px 0;
}
/* CHILD ROW */
.kbft-children {
display: flex;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
}
/* EMPTY META PLACEHOLDER (keeps rows aligned) */
.kbft-union-meta-empty {
visibility: hidden;
height: 14px;
}