MediaWiki:Common.css
From KB Lexicon
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.
/* 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;
}
/* =========================
KBFT CORE
========================= */
.mw-parser-output .kbft-tree {
text-align: center;
background: #f5f1eb;
border: 1px solid #ccb79e;
border-radius: 18px;
padding: 28px 24px 34px;
margin: 1.25em 0;
overflow-x: auto;
}
.mw-parser-output .kbft-title {
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 1.5rem;
color: #3d2e1f;
}
.mw-parser-output .kbft-generation {
margin: 22px 0;
}
.mw-parser-output .kbft-connector {
width: 2px;
height: 28px;
background: #bca88e;
margin: 0 auto;
}
.mw-parser-output .kbft-row {
display: flex !important;
flex-direction: row !important;
justify-content: center !important;
align-items: flex-start !important;
gap: 34px !important;
flex-wrap: wrap !important;
}
.mw-parser-output .kbft-focal-row,
.mw-parser-output .kbft-desc-row {
display: flex !important;
flex-direction: row !important;
justify-content: center !important;
align-items: flex-start !important;
gap: 26px !important;
flex-wrap: nowrap !important;
}
.mw-parser-output .kbft-focal-col,
.mw-parser-output .kbft-branch-col {
display: inline-flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: flex-start !important;
flex: 0 0 auto !important;
width: auto !important;
min-width: 0 !important;
max-width: none !important;
}
.mw-parser-output .kbft-single {
display: inline-flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: flex-start !important;
width: auto !important;
min-width: 0 !important;
max-width: none !important;
}
.mw-parser-output .kbft-couple {
display: flex !important;
align-items: center !important;
justify-content: center !important;
gap: 10px !important;
}
.mw-parser-output .kbft-marriage {
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 36px !important;
}
.mw-parser-output .kbft-marriage-line {
width: 36px !important;
height: 2px !important;
background: #bca88e !important;
}
.mw-parser-output .kbft-card {
background: #fcfaf7;
border: 1px solid #ccb79e;
border-radius: 12px;
padding: 10px 14px;
min-width: 118px;
box-shadow: 0 1px 4px rgba(0,0,0,0.08);
line-height: 1.25;
display: inline-block !important;
width: auto !important;
max-width: 170px !important;
}
.mw-parser-output .kbft-card a {
text-decoration: none;
}
.mw-parser-output .kbft-focus-card {
border: 2px solid #a88c5a;
}
.mw-parser-output .kbft-years {
font-size: 0.78em;
color: #6e5a42;
margin-top: 5px;
}
.mw-parser-output .kbft-union-meta {
font-size: 0.85em;
color: #5f4b36;
margin-top: 10px;
margin-bottom: 6px;
min-height: 1.2em;
text-align: center;
}
.mw-parser-output .kbft-union-meta-empty {
visibility: hidden;
}
.mw-parser-output .kbft-child-down {
width: 2px;
height: 22px;
background: #bca88e;
margin: 4px 0 8px;
}
.mw-parser-output .kbft-children {
display: flex !important;
flex-direction: row !important;
flex-wrap: wrap !important;
justify-content: center !important;
gap: 10px !important;
}
/* =========================
FAMILYTREE MODE
Keep this minimal; critical positioning is inline in Lua.
========================= */
.mw-parser-output .kbft-familytree {
overflow-x: auto;
}
.mw-parser-output .kbft-familytree-wrap {
display: inline-block;
min-width: max-content;
padding: 6px 12px 14px;
}