MediaWiki:Common.css
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.
/*
IGNORE THE ‘CSS ERRORS’.
Those are just because this editor doesn’t understand that
browsers nowadays *do* in fact support CSS nesting...
*/
/* Fonts. */
@font-face {
font-family: OpenSans;
src: local("Open Sans"), local("Open-Sans"), url("/w/images/2/2f/Open-sans.regular.woff") format("woff");
}
@font-face {
font-family: OpenSans;
font-style: italic;
src: local("Open Sans Italic"), local("Open-Sans-Italic"), url("/w/images/d/df/Open-sans.italic.woff") format("woff");
}
@font-face {
font-family: OpenSans;
font-weight: bold;
src: local("Open Sans Bold"), local("Open-Sans-Bold"), url("/w/images/8/87/Open-sans.bold.woff") format("woff");
}
@font-face {
font-family: OpenSans;
font-style: italic;
font-weight: bold;
src: local("Open Sans Bold Italic"), local("Open-Sans-Bold-Italic"), url("/w/images/9/9f/Open-sans.bold-italic.woff") format("woff");
}
/* Variables. */
:root {
--accent-colour: #724E2C;
--accent-dark: #3D220C;
--accent-very-light: #e7dbd1;
}
/* Global settings. */
body {
font-family: OpenSans, "Noto Sans", sans-serif;
font-size: 1.1rem;
}
/* Borders and accent colour. */
h1, h2 {
border-bottom: 1px solid var(--accent-dark);
}
h1, h2, h3, h4, h5, h6, :where(strong), :where(b) {
color: var(--accent-dark) !important;
}
dt {
color: var(--accent-dark);
}
:where(a), :where(a:visited), .mw-collapsible-toggle-default .mw-collapsible-text, .toctogglelabel {
color: var(--accent-colour) !important;
}
.mw-parser-output a.external {
background-image: url("/w/images/7/7b/Link-icon.svg") !important;
}
.vector-menu-tabs #ca-unwatch.icon a::before {
background-image: url("/w/images/8/8a/Unwatch-icon.svg");
}
.mw-body {
border: 1px solid var(--accent-dark);
}
.vector-menu-tabs, .vector-menu-tabs-legacy {
& li { background-image: linear-gradient(to top, var(--accent-colour) 0, var(--accent-very-light) 1px, #ffffff 100%) !important; }
& a { background-image: linear-gradient(to bottom,rgba(167,215,249,0) 0,var(--accent-colour) 100%) !important; }
& .selected a { background: white !important; }
}
.vector-menu-tabs, .vector-menu-tabs a, #mw-head .vector-menu-dropdown .vector-menu-heading {
background-image: linear-gradient(to bottom,rgba(167,215,249,0) 0,var(--accent-colour) 100%) !important;
}
:where(a.new) {
color: #ba0000 !important;
}
/* Helpers. */
.centering {
margin-inline: auto;
}
/* Text. */
.vector-body p {
text-align: justify;
hyphens: auto;
}
/* Tables. */
table.wikitable {
border: 1px solid var(--accent-color);
& caption { color: var(--accent-dark); }
& tr:nth-child(even) { background: white; }
& tr:nth-child(odd) { background: #d5c5b8; }
& td, th { border: 1px solid var(--accent-colour); }
& th { background: var(--accent-colour); color: white; }
}
/*
Dark mode fixups.
FIXME: An inversion + hue rotation filter is a horrible way
to do dark mode. Actually add/get a proper dark mode.
*/
.site-notice-dark-mode-only {
opacity: 0;
user-select: none;
}
.client-darkmode {
& .mw-wiki-logo, canvas {
filter: invert(1) hue-rotate(180deg);
}
& .site-notice-dark-mode-only {
opacity: unset;
user-select: unset;
}
div.template-infobox {
background: #dddddd;
}
figure[typeof~='mw:File/Thumb'] > :not(figcaption) .mw-file-element,
figure[typeof~='mw:File/Frame'] > :not(figcaption) .mw-file-element {
background: none !important;
}
}
/** Scale down the logo in case it is too large. */
.mw-wiki-logo {
background-size: 90%;
}
/** Align thumbnail formatting w/ infoboxes. */
figure[typeof~='mw:File/Thumb'], figure[typeof~='mw:File/Frame'] {
border: 1px solid var(--accent-colour);
width: 22em;
background: none !important;
margin-bottom: 0 !important;
& a::after {
display: none;
}
& img {
object-fit: contain;
width: 22em;
height: auto;
margin: 0 !important;
border: none !important;
}
& figcaption {
margin-top: 1rem;
background: none;
border: none;
text-align: center !important;
font-style: italic;
}
}
/* This contains the formatting for infoboxes. */
div.template-infobox {
display: flex;
flex-direction: column;
width: 22em;
float: right;
clear: right;
border: 1px solid var(--accent-colour);
padding: 0;
margin-left: 1rem;
margin-bottom: 1rem;
/* Title. */
& > p {
margin: 0;
text-align: center;
font-size: 1.2rem;
font-weight: bold;
width: 100%;
min-height: 2rem;
line-height: 2rem;
background: var(--accent-colour);
color: white;
}
/* Image. */
& img {
display: block;
margin: 0;
width: 22em;
height: auto;
max-height: 30rem;
object-fit: contain;
}
/* Caption. */
& div.infobox-caption {
padding: .5rem 1rem;
font-style: italic;
text-align: center;
border-bottom: 1px solid var(--accent-colour);
}
/* Table (e.g. 'name: ...'). */
& table {
border-collapse: collapse;
border-style: hidden;
}
& tr { border: 1px solid var(--accent-colour); }
& td:first-child {
width: 6rem;
font-weight: bold;
border: 1px solid var(--accent-colour);
color: var(--accent-dark);
}
& td {
padding: .25rem;
align-content: baseline;
}
/* The 'starring' row of the film template should not be justified. */
& .template-film-row-starring p {
text-align: left !important;
}
}