MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
browsers nowadays *do* in fact support CSS nesting... | browsers nowadays *do* in fact support CSS nesting... | ||
*/ | */ | ||
:root { | |||
--accent-colour: #724E2C; | |||
} | |||
/* This contains the formatting for the Biography template. */ | /* This contains the formatting for the Biography template. */ | ||
Line 25: | Line 29: | ||
height: 1.5rem; | height: 1.5rem; | ||
line-height: 1.5rem; | line-height: 1.5rem; | ||
background: | background: var(--accent-colour); | ||
color: white; | color: white; | ||
} | } | ||
Line 39: | Line 43: | ||
/* Table (e.g. 'name: ...'). */ | /* Table (e.g. 'name: ...'). */ | ||
& table { | & table { | ||
& tr { | border-collapse: collapse; | ||
border-style: hidden; | |||
} | |||
& tr { border: 1px solid var(--accent-colour); } | |||
& td:first-child { | & td:first-child { | ||
width: 5rem; | width: 5rem; | ||
font-weight: bold; | font-weight: bold; | ||
border: 1px solid var(--accent-colour); | |||
} | } | ||
} | } |
Revision as of 21:39, 21 June 2024
/*
IGNORE THE ‘CSS ERRORS’.
Those are just because this editor doesn’t understand that
browsers nowadays *do* in fact support CSS nesting...
*/
:root {
--accent-colour: #724E2C;
}
/* This contains the formatting for the Biography template. */
div.global-biography {
display: flex;
flex-direction: column;
width: 22em;
float: right;
clear: right;
border: 1px solid black;
padding: 0;
/* Title. */
& > p {
margin: 0;
text-align: center;
font-size: 1.2rem;
font-weight: bold;
width: 100%;
height: 1.5rem;
line-height: 1.5rem;
background: var(--accent-colour);
color: white;
}
/* Image. */
& img {
display: block;
margin: 0;
width: 22em;
height: auto;
object-fit: contain;
}
/* Table (e.g. 'name: ...'). */
& table {
border-collapse: collapse;
border-style: hidden;
}
& tr { border: 1px solid var(--accent-colour); }
& td:first-child {
width: 5rem;
font-weight: bold;
border: 1px solid var(--accent-colour);
}
}