« MediaWiki:Citizen.css » : différence entre les versions
Page de l’interface de MediaWiki
Autres actions
m A protégé « MediaWiki:Citizen.css » ([Modifier=Autoriser uniquement les administrateurs] (infini) [Renommer=Autoriser uniquement les administrateurs] (infini)) |
Aucun résumé des modifications |
||
| (28 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
/* | /* ============================================================ | ||
. | * Mediawiki:Citizen.css — Nefald Wiki | ||
* Palette centralisée OKLCH + support light/dark/auto | |||
* ============================================================ */ | |||
/* ============================================================ | |||
* 1. PALETTE NEFALD — Variables personnalisées | |||
* Définies sur :root, surchargées par thème | |||
* ============================================================ */ | |||
:root { | |||
/* -- Couleur progressive Citizen (hue = teinte principale) -- */ | |||
/* Bleu-acier Nefald : ajuste __h pour ta teinte de marque */ | |||
--color-progressive-oklch__l: 53.25%; | |||
--color-progressive-oklch__c: 0.1679; | |||
--color-progressive-oklch__h: 230; | |||
/* -- Palette sémantique Nefald (light par défaut) -- */ | |||
/* Success */ | |||
--nefald-success-bg: oklch(93% 0.08 145); | |||
--nefald-success-text: oklch(35% 0.12 145); | |||
--nefald-success-border: oklch(75% 0.14 145); | |||
/* Danger */ | |||
--nefald-danger-bg: oklch(93% 0.07 25); | |||
--nefald-danger-text: oklch(38% 0.14 25); | |||
--nefald-danger-border: oklch(70% 0.16 25); | |||
/* Warning */ | |||
--nefald-warning-bg: oklch(95% 0.09 85); | |||
--nefald-warning-text: oklch(42% 0.13 75); | |||
--nefald-warning-border: oklch(78% 0.15 85); | |||
/* Info */ | |||
--nefald-info-bg: oklch(93% 0.06 230); | |||
--nefald-info-text: oklch(38% 0.12 230); | |||
--nefald-info-border: oklch(72% 0.14 230); | |||
/* Neutral */ | |||
--nefald-neutral-bg: oklch(94% 0.01 230); | |||
--nefald-neutral-text: oklch(40% 0.02 230); | |||
--nefald-neutral-border: oklch(78% 0.02 230); | |||
/* Accent (couleur de marque directe) */ | |||
--nefald-accent: oklch(53.25% 0.1679 230); | |||
--nefald-accent-subtle: oklch(93% 0.05 230); | |||
} | |||
/* -- Mode sombre (manuel) -- */ | |||
:root.skin-theme-clientpref-night { | |||
--nefald-success-bg: oklch(28% 0.09 145); | |||
--nefald-success-text: oklch(82% 0.12 145); | |||
--nefald-success-border: oklch(45% 0.12 145); | |||
--nefald-danger-bg: oklch(28% 0.09 25); | |||
--nefald-danger-text: oklch(85% 0.10 25); | |||
--nefald-danger-border: oklch(48% 0.14 25); | |||
--nefald-warning-bg: oklch(30% 0.09 75); | |||
--nefald-warning-text: oklch(88% 0.12 85); | |||
--nefald-warning-border: oklch(52% 0.14 80); | |||
--nefald-info-bg: oklch(28% 0.07 230); | |||
--nefald-info-text: oklch(84% 0.10 230); | |||
--nefald-info-border: oklch(48% 0.12 230); | |||
--nefald-neutral-bg: oklch(28% 0.01 230); | |||
--nefald-neutral-text: oklch(82% 0.02 230); | |||
--nefald-neutral-border: oklch(45% 0.02 230); | |||
--nefald-accent: oklch(65% 0.18 230); | |||
--nefald-accent-subtle: oklch(28% 0.07 230); | |||
} | } | ||
. | /* -- Mode automatique (suit le système) -- */ | ||
@media (prefers-color-scheme: dark) { | |||
:root.skin-theme-clientpref-os { | |||
--nefald-success-bg: oklch(28% 0.09 145); | |||
--nefald-success-text: oklch(82% 0.12 145); | |||
--nefald-success-border: oklch(45% 0.12 145); | |||
--nefald-danger-bg: oklch(28% 0.09 25); | |||
--nefald-danger-text: oklch(85% 0.10 25); | |||
--nefald-danger-border: oklch(48% 0.14 25); | |||
--nefald-warning-bg: oklch(30% 0.09 75); | |||
--nefald-warning-text: oklch(88% 0.12 85); | |||
--nefald-warning-border: oklch(52% 0.14 80); | |||
--nefald-info-bg: oklch(28% 0.07 230); | |||
--nefald-info-text: oklch(84% 0.10 230); | |||
--nefald-info-border: oklch(48% 0.12 230); | |||
--nefald-neutral-bg: oklch(28% 0.01 230); | |||
--nefald-neutral-text: oklch(82% 0.02 230); | |||
--nefald-neutral-border: oklch(45% 0.02 230); | |||
--nefald-accent: oklch(65% 0.18 230); | |||
--nefald-accent-subtle: oklch(28% 0.07 230); | |||
} | |||
} | } | ||
/* | /* ============================================================ | ||
* | * 2. TYPOGRAPHIE | ||
* | * ============================================================ */ | ||
*/ | |||
h1, h2, h3, h4, h5, h6, | |||
.citizen- | .citizen-sticky-header-page-title { | ||
font-weight: var(--font-weight-medium); | |||
} | } | ||
h4, h5, h6 { | |||
letter-spacing: 0.0125em; | |||
} | } | ||
. | |||
/* ============================================================ | |||
* 3. TABLEAUX — Classes sémantiques | |||
* Usage : class="wikitable" + class="table-color-success" sur <td> | |||
* ============================================================ */ | |||
.table-color-success { | |||
background-color: var(--nefald-success-bg) !important; | |||
color: var(--nefald-success-text) !important; | |||
border-left: 3px solid var(--nefald-success-border) !important; | |||
} | } | ||
. | .table-color-danger { | ||
background-color: var(--nefald-danger-bg) !important; | |||
color: var(--nefald-danger-text) !important; | |||
border-left: 3px solid var(--nefald-danger-border) !important; | |||
} | } | ||
. | .table-color-warning { | ||
background-color: var(--nefald-warning-bg) !important; | |||
color: var(--nefald-warning-bg) !important; | |||
border-left: 3px solid var(--nefald-warning-border) !important; | |||
} | } | ||
.table-color-info { | |||
. | background-color: var(--nefald-info-bg) !important; | ||
color: var(--nefald-info-text) !important; | |||
border-left: 3px solid var(--nefald-info-border) !important; | |||
} | } | ||
.table-color-secondary { | |||
background-color: var(--nefald-neutral-bg) !important; | |||
color: var(--nefald-neutral-text) !important; | |||
border-left: 3px solid var(--nefald-neutral-border) !important; | |||
} | |||
/* Transition et hover */ | |||
.table-color-success, | |||
.table-color-danger, | |||
.table-color-warning, | |||
.table-color-info, | |||
.table-color-secondary { | |||
transition: filter 0.2s ease; | |||
} | } | ||
. | .wikitable tr:hover .table-color-success, | ||
.wikitable tr:hover .table-color-danger, | |||
.wikitable tr:hover .table-color-warning, | |||
.wikitable tr:hover .table-color-info, | |||
.wikitable tr:hover .table-color-secondary { | |||
filter: brightness(0.95); | |||
} | } | ||
/* Code dans les cellules colorées */ | |||
.table-color-success code, | |||
.table-color-danger code, | |||
.table-color-warning code, | |||
.table-color-info code, | |||
.table-color-secondary code { | |||
background-color: rgba(0, 0, 0, 0.1) !important; | |||
color: inherit !important; | |||
border: 1px solid rgba(0, 0, 0, 0.15); | |||
padding: 2px 6px; | |||
border-radius: 3px; | |||
font-size: 0.9em; | |||
} | } | ||
:root.skin-theme-clientpref-night .table-color-success code, | |||
:root.skin-theme-clientpref-night .table-color-danger code, | |||
:root.skin-theme-clientpref-night .table-color-warning code, | |||
:root.skin-theme-clientpref-night .table-color-info code, | |||
:root.skin-theme-clientpref-night .table-color-secondary code { | |||
background-color: rgba(255, 255, 255, 0.1) !important; | |||
border-color: rgba(255, 255, 255, 0.15); | |||
} | } | ||
/* Focus accessibilité */ | |||
.table-color-success:focus-within, | |||
.table-color-danger:focus-within, | |||
.table-color-warning:focus-within, | |||
.table-color-info:focus-within, | |||
.table-color-secondary:focus-within { | |||
outline: 2px solid currentColor; | |||
outline-offset: -2px; | |||
} | } | ||
/* ============================================================ | |||
* 4. COMMAND PALETTE — Repositionnement desktop | |||
* ============================================================ */ | |||
@media (min-width: 1000px) { | |||
.citizen-command-palette { | |||
left: calc(56px + var(--space-xs)) !important; | |||
top: 2rem !important; | |||
} | |||
} | } | ||
/* ============================================================ | |||
* 5. MENU LATÉRAL (Drawer) | |||
* ============================================================ */ | |||
/* Suppression de l'espace bas géré par le portlet footer */ | |||
.citizen-drawer__menu { | |||
margin-bottom: 0; | |||
padding-bottom: 0; | |||
} | } | ||
/* Portlet liens externes — sticky en bas du drawer */ | |||
.mw-portlet-External { | |||
position: sticky; | |||
bottom: 0; | |||
margin-top: var(--space-md); | |||
margin-inline: calc(var(--space-xs) * -1); | |||
padding: var(--space-xs); | |||
border-top: var(--border-base); | |||
backdrop-filter: var(--backdrop-filter-frosted-glass); | |||
font-size: var(--font-size-x-small); | |||
grid-column: 1 / -1; | |||
white-space: nowrap; | |||
} | } | ||
.mw-portlet-External .citizen-menu__heading { | |||
display: none; | |||
} | } | ||
.mw-portlet-External ul { | |||
display: flex; | |||
overflow: auto; | |||
} | } | ||
.mw-portlet-External .mw-list-item a { | |||
gap: 0; | |||
} | } | ||
/* | /* Labels de section sidebar */ | ||
.citizen- | .citizen-drawer__menu [id^="n-sidebar-label-"] a { | ||
pointer-events: none; | |||
margin-left: var(--space-xs); | |||
padding-left: var(--space-md); | |||
padding-right: var(--space-xs); | |||
border-left: 1px solid var(--border-color-base); | |||
border-radius: 0; | |||
letter-spacing: 0.05em; | |||
font-weight: var(--font-weight-normal); | |||
color: var(--color-subtle) !important; | |||
} | } | ||
.citizen- | /* Icônes sidebar (masque SVG) */ | ||
.citizen-drawer__menu [id^="n-sidebar-icon-"] a { | |||
font-size: 0; | |||
content-visibility: auto; | |||
} | } | ||
.citizen- | .citizen-drawer__menu [id^="n-sidebar-icon-"] a:before { | ||
display: block; | |||
content: ""; | |||
width: var(--size-icon); | |||
height: var(--size-icon); | |||
background-color: currentColor; | |||
mask-size: contain; | |||
mask-repeat: no-repeat; | |||
mask-position: center; | |||
} | } | ||
/* | /* Icônes réseaux sociaux */ | ||
#n-sidebar-icon-bluesky a:before { mask-image: url(https://wiki.nefald.fr/images/2/21/IconButton-bluesky.svg); } | |||
#n-sidebar-icon-discord a:before { mask-image: url(https://wiki.nefald.fr/images/9/9c/Discord_Icons.svg); } | |||
#n-sidebar-icon-facebook a:before { mask-image: url(https://wiki.nefald.fr/images/9/9c/IconButton-facebook.svg); } | |||
# | #n-sidebar-icon-ghost a:before { mask-image: url(https://wiki.nefald.fr/images/f/f6/IconButton-ghost.svg); } | ||
#n-sidebar-icon-gitlab a:before { mask-image: url(https://wiki.nefald.fr/images/0/01/IconButton-gitlab.svg); } | |||
#n-sidebar-icon-helloasso a:before { mask-image: url(https://wiki.nefald.fr/images/c/c3/IconButton-helloasso.svg); } | |||
#n-sidebar-icon-instagram a:before { mask-image: url(https://wiki.nefald.fr/images/f/f9/ButtonLink-instagram.svg); } | |||
#n-sidebar-icon-mastodon a:before { mask-image: url(https://wiki.nefald.fr/images/b/b0/IconButton-mastodon.svg); } | |||
#n-sidebar-icon-patreon a:before { mask-image: url(); } | |||
#n-sidebar-icon-tiktok a:before { mask-image: url(https://wiki.nefald.fr/images/0/07/IconButton-tiktok.svg); } | |||
#n-sidebar-icon-twitter a:before { mask-image: url(https://wiki.nefald.fr/images/3/35/ButtonLink-twitter.svg); } | |||
#n-sidebar-icon-youtube a:before { mask-image: url(https://wiki.nefald.fr/images/6/64/IconButton-youtube.svg); } | |||
/* ============================================================ | |||
* 6. FOOTER | |||
* ============================================================ */ | |||
.citizen-footer { | |||
padding-block: 6rem; | |||
background-color: transparent; | |||
} | } | ||
.citizen-footer__siteinfo { | |||
justify-content: space-between; | |||
} | } | ||
#footer-icons a: | /* Icônes footer custom */ | ||
#footer-icons a { | |||
border: 0; | |||
padding: 0; | |||
background: transparent; | |||
opacity: var(--opacity-icon-base); | |||
transition: opacity 250ms ease; | |||
} | } | ||
#footer-icons a:hover { opacity: var(--opacity-icon-base--hover); } | |||
#footer-icons a:active { opacity: var(--opacity-icon-base--active); } | |||
#footer-icons ul, | #footer-icons ul, | ||
#footer-icons li { | #footer-icons li { | ||
column-gap: var(--space-md); | |||
} | } | ||
#footer-icons img { | #footer-icons img { | ||
width: auto; | |||
height: 32px; | |||
} | } | ||