MediaWiki:Citizen.css
MediaWiki interface page
More actions
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* All CSS here will be loaded for users of the Citizen skin */
/*
* Wires the `--fw-*` variables from MediaWiki:Common.css into the Citizen skin,
* and adds the decorative background images.
*
* To swap an image: upload a new version of the file (Special:ListFiles), or
* change the URL below. To remove one: delete its `background-image` line.
*/
/**
* Background images
*/
@media screen {
/* Hero image at the top of every page */
.citizen-page-container::before {
background-image: url(/images/4/4f/Theme_hero_panorama.jpg);
background-position: 70% center;
}
/* Behind the site header (left bar on desktop) */
.citizen-header::before {
background-image: url(/images/1/13/Theme_header_image.webp);
}
/* Vertical inscription along the left edge of the content */
.citizen-body-container::after {
background-image: url(/images/f/f9/Theme_inscription_vertical.svg);
}
}
/* Faint map behind the content, desktop only */
@media screen and (min-width: 1120px) {
.mw-body::before {
background-image: url(/images/f/f5/Theme_background_map.svg);
}
}
/**
* Theme: light (default)
*/
:root {
--color-surface-0: var(--fw-color-surface-0);
--color-surface-1: var(--fw-color-surface-1);
--color-surface-2: var(--fw-color-surface-2);
--color-surface-3: var(--fw-color-surface-3);
--color-surface-4: var(--fw-color-surface-4);
--color-base: var(--fw-color-base);
--color-emphasized: var(--fw-color-emphasized);
--color-subtle: var(--fw-color-subtle);
--color-progressive: var(--fw-color-progressive);
--color-progressive--hover: var(--fw-color-progressive--hover);
--color-progressive--active: var(--fw-color-progressive--active);
--color-inverted-primary: var(--fw-color-inverted-progressive);
--border-color-base: var(--fw-border-color-base);
--border-color-subtle: var(--fw-border-color-subtle);
--border-color-interactive: var(--fw-border-color-interactive);
--font-family-citizen-base: var(--fw-font-family-body);
/* Hue/lightness that Citizen derives its secondary shades from (green) */
--color-progressive-oklch__l: 53%;
--color-progressive-oklch__c: 0.14;
--color-progressive-oklch__h: 130;
--color-progressive-hsl__h: 84.5;
--color-progressive-hsl__s: 69%;
--color-progressive-hsl__l: 28%;
--fw-inscription-size: 8px;
}
/**
* Theme: dark
*/
:root.skin-theme-clientpref-night,
:root.skin-theme-clientpref-black {
--fw-border-color-base: rgba(255, 255, 255, 0.05);
--fw-border-color-subtle: rgba(255, 255, 255, 0.02);
--fw-border-color-interactive: rgba(255, 255, 255, 0.08);
--fw-color-base: #e4ddcf;
--fw-color-emphasized: #fbf8f1;
--fw-color-subtle: #e3d2b0;
--fw-color-inverted-progressive: #000;
--fw-color-surface-0: #1a1a1f;
--fw-color-surface-1: #1f1f24;
--fw-color-surface-2: #23232e;
--fw-color-surface-3: #282833;
--fw-color-surface-4: #2c2c3c;
--fw-color-surface-5: #313142;
--fw-color-progressive: #f1c45e;
--fw-color-progressive--hover: #ffd16b;
--fw-color-progressive--active: #e4b750;
--fw-opacity-pattern: 0.05;
/* Gold accent */
--color-progressive-oklch__l: 84%;
--color-progressive-oklch__c: 0.13;
--color-progressive-oklch__h: 85;
--color-progressive-hsl__h: 41.6;
--color-progressive-hsl__s: 84%;
--color-progressive-hsl__l: 65.7%;
}
/* Dark theme, when following the operating system setting */
@media screen and (prefers-color-scheme: dark) {
:root.skin-theme-clientpref-os {
--fw-border-color-base: rgba(255, 255, 255, 0.05);
--fw-border-color-subtle: rgba(255, 255, 255, 0.02);
--fw-border-color-interactive: rgba(255, 255, 255, 0.08);
--fw-color-base: #e4ddcf;
--fw-color-emphasized: #fbf8f1;
--fw-color-subtle: #e3d2b0;
--fw-color-inverted-progressive: #000;
--fw-color-surface-0: #1a1a1f;
--fw-color-surface-1: #1f1f24;
--fw-color-surface-2: #23232e;
--fw-color-surface-3: #282833;
--fw-color-surface-4: #2c2c3c;
--fw-color-surface-5: #313142;
--fw-color-progressive: #f1c45e;
--fw-color-progressive--hover: #ffd16b;
--fw-color-progressive--active: #e4b750;
--fw-opacity-pattern: 0.05;
--color-progressive-oklch__l: 84%;
--color-progressive-oklch__c: 0.13;
--color-progressive-oklch__h: 85;
--color-progressive-hsl__h: 41.6;
--color-progressive-hsl__s: 84%;
--color-progressive-hsl__l: 65.7%;
}
}
/* Pure black variant of the dark theme */
:root.skin-theme-clientpref-black,
:root.skin-theme-clientpref-night.citizen-feature-pure-black-clientpref-1 {
--fw-color-surface-0: #000;
--fw-color-surface-1: #111;
--fw-color-surface-2: #222;
--fw-color-surface-3: #333;
--fw-color-surface-4: #444;
--fw-color-surface-5: #555;
}
@media screen and (prefers-color-scheme: dark) {
:root.skin-theme-clientpref-os.citizen-feature-pure-black-clientpref-1 {
--fw-color-surface-0: #000;
--fw-color-surface-1: #111;
--fw-color-surface-2: #222;
--fw-color-surface-3: #333;
--fw-color-surface-4: #444;
--fw-color-surface-5: #555;
}
}
/**
* Typography
*/
h1,
h2,
h3,
h4,
h5,
h6,
.citizen-page-heading,
.mw-logo-wordmark {
font-family: var(--fw-font-family-heading);
}
/* Wordmark size */
img.mw-logo-wordmark {
height: 2rem;
}
@media screen and (min-width: 640px) {
img.mw-logo-wordmark {
height: 2.5rem;
}
}
/* Sticky header appears 100px later, below the hero image */
#citizen-page-header-sticky-sentinel {
transform: translateY(100px);
}
/**
* Background image plumbing
*/
.citizen-page-container,
.citizen-body-container {
position: relative;
}
.citizen-header::before,
.citizen-page-container::before,
.mw-body::before,
.citizen-body-container::after {
content: '';
position: absolute;
inset: 0;
pointer-events: none;
}
.citizen-header::before,
.citizen-page-container::before {
background-repeat: no-repeat;
}
.mw-body::before,
.citizen-body-container::after {
background-repeat: repeat-y;
filter: var(--filter-invert);
}
.citizen-header::before {
background-position: center left;
background-size: contain;
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent 32px);
-webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent 32px);
}
.citizen-page-container::before {
height: 200px;
background-size: cover;
mask-image: linear-gradient(
rgba(0, 0, 0, 0.35),
rgba(0, 0, 0, 0.2) 3rem,
rgba(0, 0, 0, 0.05) 9rem,
transparent 100%
);
-webkit-mask-image: linear-gradient(
rgba(0, 0, 0, 0.35),
rgba(0, 0, 0, 0.2) 3rem,
rgba(0, 0, 0, 0.05) 9rem,
transparent 100%
);
}
.mw-body::before {
position: fixed;
margin-left: calc(var(--fw-inscription-size) + var(--padding-page));
opacity: calc(var(--fw-opacity-pattern) * 0.5);
background-repeat: repeat;
mask-image: linear-gradient(transparent, #000 480px, #000 calc(100% - 480px), transparent);
-webkit-mask-image: linear-gradient(transparent, #000 480px, #000 calc(100% - 480px), transparent);
}
.citizen-body-container::after {
background-size: var(--fw-inscription-size);
opacity: var(--fw-opacity-pattern);
mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
-webkit-mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
}
@media screen and (min-width: 1120px) {
:root {
--fw-inscription-size: 32px;
}
/* Room for the header background image */
.citizen-header {
padding-top: 36px;
}
.citizen-header::before {
background-position: top center;
mask-image: linear-gradient(rgba(0, 0, 0, 0.2), transparent 64px);
-webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0.2), transparent 64px);
}
/* Room for the inscription */
.citizen-page-header,
.citizen-body-container {
padding-left: calc(var(--fw-inscription-size) + var(--padding-page));
}
}
@media screen and (min-width: 1680px) {
:root {
--fw-inscription-size: 3vw;
}
}
/* Main page: show the content first, the title block below it */
.page-Main_Page .citizen-body-container {
grid-template-areas:
'content'
'header'
'afterHeader'
'footer';
}
/* Do not invert the edit icon in dark mode, for contrast */
.skin-theme-clientpref-night #ca-edit .citizen-ui-icon::before,
.skin-theme-clientpref-night #ca-ve-edit .citizen-ui-icon::before {
filter: none;
}
@media screen and (prefers-color-scheme: dark) {
.skin-theme-clientpref-os #ca-edit .citizen-ui-icon::before,
.skin-theme-clientpref-os #ca-ve-edit .citizen-ui-icon::before {
filter: none;
}
}
/* Interwiki links get an external-link icon */
a.extiw::after {
display: inline-block;
width: 0.75em;
height: 0.75em;
margin-left: 0.125em;
content: '';
background-color: currentcolor;
-webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgYXJpYS1oaWRkZW49InRydWUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+IDxnIGZpbGw9ImN1cnJlbnRDb2xvciI+IDxwYXRoIGQ9Ik0xNyAxN0gzVjNoNVYxSDNhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJ2LTVoLTJ6Ii8+IDxwYXRoIGQ9Im0xMSAxIDMuMjkgMy4yOS01LjczIDUuNzMgMS40MiAxLjQyIDUuNzMtNS43M0wxOSA5VjF6Ii8+IDwvZz4gPC9zdmc+) no-repeat 50% 50%;
mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgYXJpYS1oaWRkZW49InRydWUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+IDxnIGZpbGw9ImN1cnJlbnRDb2xvciI+IDxwYXRoIGQ9Ik0xNyAxN0gzVjNoNVYxSDNhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJ2LTVoLTJ6Ii8+IDxwYXRoIGQ9Im0xMSAxIDMuMjkgMy4yOS01LjczIDUuNzMgMS40MiAxLjQyIDUuNzMtNS43M0wxOSA5VjF6Ii8+IDwvZz4gPC9zdmc+) no-repeat 50% 50%;
-webkit-mask-size: contain;
mask-size: contain;
}
/**
* Main page header ({{Main page/header}})
*/
.fw-mainpage-header {
position: relative;
margin-top: -2rem;
margin-bottom: -4rem;
padding-top: 6rem;
padding-bottom: 6rem;
clear: both;
overflow: hidden; /* The rotating inscription must not enlarge the element */
pointer-events: none; /* Let clicks through the decorative overlay */
}
/* Rotating circular inscription */
.fw-mainpage-header::before {
content: '';
position: absolute;
inset: 0;
background-image: url(/images/f/ff/Theme_main_page_ring_inscription.svg);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
opacity: 0.1;
filter: var(--filter-invert);
animation: fw-spin 60s infinite linear;
pointer-events: none;
}
.fw-mainpage-content {
align-items: center;
display: flex;
flex-direction: column;
text-align: center;
pointer-events: auto;
position: relative;
}
/* Silhouette above the wordmark */
.fw-mainpage-header-wordmark::before {
content: '';
position: absolute;
pointer-events: none;
left: 0;
right: 0;
top: -100%;
margin: 0 auto;
width: 50%;
height: 100%;
background-image: url(/images/6/6c/Theme_main_page_silhouette.svg);
background-repeat: no-repeat;
background-position: bottom center;
opacity: 0.2;
filter: var(--filter-invert);
}
.fw-mainpage-header-wordmark {
position: relative;
margin-top: 2.5rem;
width: 420px;
max-width: 100%;
padding-top: 0.75rem;
}
.fw-mainpage-header-wordmark img {
width: 100%;
height: 100%;
filter: var(--filter-invert);
}
.fw-mainpage-header-tagline {
margin-top: -0.25rem;
color: var(--fw-color-subtle);
font-size: 0.875rem;
line-height: 1.375;
}
.fw-mainpage-header-search {
align-items: center;
background-color: var(--fw-color-progressive);
border-radius: 9999px;
color: var(--fw-color-inverted-progressive);
cursor: pointer;
display: flex;
font-size: 0.875rem;
font-weight: var(--font-weight-medium);
gap: 0.5rem;
line-height: 1;
margin-top: 1rem;
padding: 1rem 2rem;
user-select: none;
}
.fw-mainpage-header-search::before {
content: '';
width: 1rem;
height: 1rem;
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M12.2 13.6a7 7 0 1 1 1.4-1.4l5.4 5.4-1.4 1.4zM3 8a5 5 0 1 0 10 0A5 5 0 0 0 3 8'/%3E%3C/svg%3E");
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M12.2 13.6a7 7 0 1 1 1.4-1.4l5.4 5.4-1.4 1.4zM3 8a5 5 0 1 0 10 0A5 5 0 0 0 3 8'/%3E%3C/svg%3E");
mask-size: contain;
-webkit-mask-size: contain;
background-color: currentColor;
display: block;
}
/* Keyboard shortcut hint */
@media (hover: hover) {
.fw-mainpage-header-search::after {
content: '/';
margin-top: -2px;
margin-bottom: -2px;
margin-left: 2px;
width: 18px;
height: 18px;
display: flex;
background-color: var(--fw-color-inverted-progressive);
color: var(--fw-color-progressive);
border-radius: 4px;
line-height: 1;
align-items: center;
justify-content: center;
font-size: 10px;
font-weight: 900;
opacity: 0.6;
}
}
.fw-mainpage-header-search:hover {
background-color: var(--fw-color-progressive--hover);
}
.fw-mainpage-header-search:active {
background-color: var(--fw-color-progressive--active);
}
@keyframes fw-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}