MediaWiki:Timeless.css

De WikiPerche

Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
  • Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
  •  Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
```css id="timeless-perche-final"
/* ==========================================================================
   MEDIAWIKI:TIMELESS.CSS
   THÈME « PERCHE »
   
   Palette :
   Beige général       #F7F3EA
   Blanc               #FFFFFF
   Sable               #E9E0CC
   Vert foncé          #3B5B3E
   Vert                #5C7A4E
   Vert clair          #7A9471
   Brun                #8A4B2E
   Brun foncé          #6B3A22
   Texte               #2C2A26

   Principe :
   - conserver le layout natif de Timeless ;
   - modifier principalement les couleurs ;
   - ne pas imposer de dimensions ou de positionnement ;
   - éviter les règles globales susceptibles de casser VisualEditor.
   ========================================================================== */


/* ==========================================================================
   1. PALETTE
   ========================================================================== */

:root {
    --perche-bg: #F7F3EA;
    --perche-white: #FFFFFF;
    --perche-sand: #E9E0CC;
    --perche-green-dark: #3B5B3E;
    --perche-green: #5C7A4E;
    --perche-green-light: #7A9471;
    --perche-brown: #8A4B2E;
    --perche-brown-dark: #6B3A22;
    --perche-text: #2C2A26;
}


/* ==========================================================================
   2. FOND GÉNÉRAL
   ========================================================================== */

html {
    background-color: var(--perche-bg);
}

body {
    background-color: var(--perche-bg);
    color: var(--perche-text);
    min-height: 100%;
}


/* ==========================================================================
   3. CONTENU PRINCIPAL
   ========================================================================== */

#content {
    background-color: var(--perche-white);
    color: var(--perche-text);
}


/* ==========================================================================
   4. EN-TÊTE
   ========================================================================== */

#p-logo,
.mw-header,
#mw-header-container,
header#mw-header {
    background-color: var(--perche-green-dark) !important;
}

/* Logo */
#p-logo.mw-portlet {
    background-color: var(--perche-sand) !important;
}

/* Texte et liens */
.mw-header,
.mw-header a,
#mw-header-container a {
    color: var(--perche-bg) !important;
}

/* Survol */
.mw-header a:hover,
.mw-header a:focus,
#mw-header-container a:hover,
#mw-header-container a:focus {
    color: var(--perche-white) !important;
}


/* ==========================================================================
   5. MENU PERSONNEL
   ========================================================================== */

#personal-inner.dropdown {
    background-color: var(--perche-white);
    color: var(--perche-text) !important;
}

#personal-inner.dropdown a {
    color: var(--perche-text) !important;
}

#personal-inner.dropdown a:visited {
    color: var(--perche-brown-dark) !important;
}

#personal-inner.dropdown a:hover,
#personal-inner.dropdown a:focus {
    background-color: var(--perche-sand) !important;
    color: var(--perche-green-dark) !important;
}


/* ==========================================================================
   6. PIED DE PAGE
   ========================================================================== */

#mw-footer-container,
#footer {
    background-color: var(--perche-green-dark) !important;
    color: var(--perche-bg) !important;
}

#footer a,
#mw-footer-container a {
    color: var(--perche-bg) !important;
}

#footer a:hover,
#mw-footer-container a:hover {
    color: var(--perche-white) !important;
}


/* ==========================================================================
   7. SIDEBARS / NAVIGATION
   ========================================================================== */

#mw-site-navigation,
#mw-page-tools,
.sidebar-inner,
#mw-related-navigation {
    background-color: var(--perche-sand) !important;
    color: var(--perche-text);
}

/* Fond interne des portlets */
.sidebar-chunk {
    background-color: var(--perche-sand) !important;
    border: none !important;
    box-shadow: none !important;
}


/* ==========================================================================
   8. LIENS DES SIDEBARS
   ========================================================================== */

#mw-site-navigation a,
#mw-site-navigation .mw-portlet-body a,
#mw-related-navigation a,
#mw-related-navigation .mw-portlet-body a,
#mw-page-tools a,
#mw-page-tools .mw-portlet-body a,
.sidebar-inner a,
.sidebar-inner .mw-portlet-body a,
.sidebar-chunk a {
    color: var(--perche-brown) !important;
}

#mw-site-navigation a:visited,
#mw-site-navigation .mw-portlet-body a:visited,
#mw-related-navigation a:visited,
#mw-related-navigation .mw-portlet-body a:visited,
#mw-page-tools a:visited,
#mw-page-tools .mw-portlet-body a:visited,
.sidebar-inner a:visited,
.sidebar-inner .mw-portlet-body a:visited,
.sidebar-chunk a:visited {
    color: var(--perche-brown-dark) !important;
}

/* Survol */
#mw-site-navigation a:hover,
#mw-site-navigation a:focus,
#mw-related-navigation a:hover,
#mw-related-navigation a:focus,
#mw-page-tools a:hover,
#mw-page-tools a:focus,
.sidebar-inner a:hover,
.sidebar-inner a:focus,
.sidebar-chunk a:hover,
.sidebar-chunk a:focus {
    color: var(--perche-green-dark) !important;
}


/* ==========================================================================
   9. LIENS DU CONTENU
   ========================================================================== */

#content a {
    color: var(--perche-brown);
}

#content a:visited {
    color: var(--perche-brown-dark);
}

#content a:hover,
#content a:focus {
    color: var(--perche-green-dark);
}


/* ==========================================================================
   10. RÉFÉRENCES / SOURCES
   ========================================================================== */

#content .reference a:hover,
#content .reference a:focus,
#content sup.reference a:hover,
#content sup.reference a:focus,
#content .mw-references a:hover,
#content .mw-references a:focus {
    color: var(--perche-green-dark) !important;
}


/* ==========================================================================
   11. BORDURES ET SÉPARATEURS
   ========================================================================== */

#content,
.sidebar-inner,
#mw-site-navigation {
    border-color: var(--perche-green-light) !important;
}

hr {
    border-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   12. ÉLÉMENTS TECHNIQUES DU HEADER TIMELESS
   ========================================================================== */

#mw-head-base,
#mw-page-base {
    background-color: var(--perche-green-dark) !important;
}

.mw-header-container,
.mw-header-wrapper {
    background-color: var(--perche-green-dark) !important;
}


/* ==========================================================================
   13. BARRE DE COULEUR SOUS L'EN-TÊTE
   ========================================================================== */

.color-bar {
    background-color: var(--perche-green-light) !important;
}

.color-middle,
.color-middle-container {
    background-color: var(--perche-green) !important;
}

.color-left,
.color-right {
    background-color: var(--perche-sand) !important;
}


/* ==========================================================================
   14. TITRES
   ========================================================================== */

/*
 * MediaWiki utilise désormais des conteneurs .mw-heading pour les titres.
 * On prend en charge à la fois cette structure et les anciens h1/h2.
 */

/* Titres de niveau 1 */
#content .mw-heading1,
#content h1 {
    border-bottom-color: var(--perche-green-light) !important;
}

/* Titres de niveau 2 */
#content .mw-heading2,
#content h2 {
    border-bottom-color: var(--perche-green-light) !important;
}

/* Titres de niveau 3 à 6 */
#content .mw-heading3,
#content .mw-heading4,
#content .mw-heading5,
#content .mw-heading6,
#content h3,
#content h4,
#content h5,
#content h6 {
    border-bottom-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   15. ONGLETS DE PAGE
   ========================================================================== */

#mw-page-header-links .mw-portlet li.selected,
#mw-page-header-links .mw-portlet li.selected a,
#mw-page-header-links .mw-portlet li a:hover,
#mw-page-header-links .mw-portlet li a:focus {
    border-bottom-color: var(--perche-green-light) !important;
}

#p-associated-pages li.selected,
#p-views li.selected {
    border-bottom-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   16. SOMMAIRE
   ========================================================================== */

.toctogglecheckbox:not(:checked) + .toctitle .toctogglelabel::after,
.toctogglecheckbox:checked + .toctitle .toctogglelabel::after {
    color: var(--perche-brown);
}

.toctitle .toctogglelabel:hover::after {
    color: var(--perche-green-dark);
    text-decoration: underline;
    cursor: pointer;
}


/* ==========================================================================
   17. RECHERCHE — SUGGESTIONS
   ========================================================================== */

.mw-searchSuggest-link:hover,
.mw-searchSuggest-link:hover *,
.mw-searchSuggest-link.mw-searchSuggest-active,
.mw-searchSuggest-link.mw-searchSuggest-active * {
    background-color: var(--perche-sand) !important;
    color: var(--perche-text) !important;
}

.suggestions-result-current,
.suggestions-result-current .mw-searchSuggest-link,
.suggestions-result-current * {
    background-color: var(--perche-sand) !important;
    color: var(--perche-text) !important;
}


/* ==========================================================================
   18. CHAMPS DE RECHERCHE
   ========================================================================== */

#simpleSearch {
    border-color: var(--perche-green-light) !important;
}

#searchInput {
    color: var(--perche-text);
}


/* ==========================================================================
   19. TABLEAUX MEDIAWIKI
   ========================================================================== */

.wikitable {
    border-color: var(--perche-green-light) !important;
}

.wikitable > tr > th,
.wikitable > * > tr > th {
    background-color: var(--perche-sand) !important;
    color: var(--perche-green-dark);
    border-color: var(--perche-green-light) !important;
}

.wikitable > tr > td,
.wikitable > * > tr > td {
    border-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   20. IMAGES / MINIATURES
   ========================================================================== */

.thumbinner {
    background-color: var(--perche-bg) !important;
    border-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   21. CODE
   ========================================================================== */

pre,
code {
    background-color: var(--perche-bg);
    color: var(--perche-text);
    border-color: var(--perche-green-light);
}


/* ==========================================================================
   22. BOUTONS DU SITE
   ========================================================================== */

/*
 * Tous les boutons classiques MediaWiki et OOUI :
 *
 * Normal  : vert
 * Texte   : blanc
 * Survol  : vert foncé
 *
 * Les règles VisualEditor spécifiques plus bas permettent de garantir
 * le même rendu pour le bouton « Enregistrer les modifications ».
 */

.mw-ui-button,
.oo-ui-buttonElement-button {
    background-color: var(--perche-green) !important;
    background-image: none !important;
    color: var(--perche-white) !important;
    border-color: var(--perche-green-dark) !important;
}

/* Texte et éléments internes */
.mw-ui-button *,
.oo-ui-buttonElement-button * {
    color: var(--perche-white) !important;
}


/* Survol / focus */

.mw-ui-button:hover,
.mw-ui-button:focus,
.oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-button:focus {
    background-color: var(--perche-green-dark) !important;
    background-image: none !important;
    color: var(--perche-white) !important;
    border-color: var(--perche-green-dark) !important;
}

.mw-ui-button:hover *,
.mw-ui-button:focus *,
.oo-ui-buttonElement-button:hover *,
.oo-ui-buttonElement-button:focus * {
    color: var(--perche-white) !important;
}


/* Boutons actifs */

.mw-ui-button:active,
.oo-ui-buttonElement-button:active {
    background-color: var(--perche-green-dark) !important;
    color: var(--perche-white) !important;
    border-color: var(--perche-green-dark) !important;
}


/* Boutons désactivés */

.mw-ui-button:disabled,
.mw-ui-button.disabled,
.oo-ui-buttonElement-button:disabled,
.oo-ui-widget-disabled .oo-ui-buttonElement-button {
    background-color: var(--perche-green-light) !important;
    color: var(--perche-bg) !important;
    border-color: var(--perche-green-light) !important;
}


/* ==========================================================================
   23. VISUALEDITOR — ENREGISTRER LES MODIFICATIONS
   ========================================================================== */

/*
 * Renforcement spécifique du bouton de sauvegarde de VisualEditor.
 *
 * Le groupe save est ciblé afin de garantir le rendu même lorsqu'une
 * règle OOUI plus spécifique est appliquée par VisualEditor.
 */


/* Fond */

.ve-ui-toolbar-group-save .oo-ui-tool-link,
.ve-ui-toolbar-group-save .oo-ui-tool,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button {
    background-color: var(--perche-green) !important;
    background-image: none !important;
    border-color: var(--perche-green-dark) !important;
    box-shadow: none !important;
}


/* Texte */

.ve-ui-toolbar-group-save .oo-ui-tool-link,
.ve-ui-toolbar-group-save .oo-ui-tool-link *,
.ve-ui-toolbar-group-save .oo-ui-tool,
.ve-ui-toolbar-group-save .oo-ui-tool *,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button *,
.ve-ui-toolbar-group-save .oo-ui-tool-title,
.ve-ui-toolbar-group-save .oo-ui-tool-title *,
.ve-ui-toolbar-group-save .oo-ui-labelElement-label,
.ve-ui-toolbar-group-save .oo-ui-labelElement-label * {
    color: var(--perche-white) !important;
}


/* Survol */

.ve-ui-toolbar-group-save .oo-ui-tool-link:hover,
.ve-ui-toolbar-group-save .oo-ui-tool:hover,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:hover {
    background-color: var(--perche-green-dark) !important;
    background-image: none !important;
    border-color: var(--perche-green-dark) !important;
    color: var(--perche-white) !important;
}

.ve-ui-toolbar-group-save .oo-ui-tool-link:hover *,
.ve-ui-toolbar-group-save .oo-ui-tool:hover *,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:hover * {
    color: var(--perche-white) !important;
}


/* Focus / actif */

.ve-ui-toolbar-group-save .oo-ui-tool-link:focus,
.ve-ui-toolbar-group-save .oo-ui-tool:focus,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:focus,
.ve-ui-toolbar-group-save .oo-ui-tool-link:active,
.ve-ui-toolbar-group-save .oo-ui-tool:active,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:active {
    background-color: var(--perche-green-dark) !important;
    background-image: none !important;
    border-color: var(--perche-green-dark) !important;
    color: var(--perche-white) !important;
}

.ve-ui-toolbar-group-save .oo-ui-tool-link:focus *,
.ve-ui-toolbar-group-save .oo-ui-tool:focus *,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:focus *,
.ve-ui-toolbar-group-save .oo-ui-tool-link:active *,
.ve-ui-toolbar-group-save .oo-ui-tool:active *,
.ve-ui-toolbar-group-save .oo-ui-buttonElement-button:active * {
    color: var(--perche-white) !important;
}


/* ==========================================================================
   24. ACCESSIBILITÉ — FOCUS
   ========================================================================== */

#content a:focus,
#mw-site-navigation a:focus,
#mw-page-tools a:focus,
#mw-related-navigation a:focus,
.sidebar-inner a:focus {
    outline-color: var(--perche-green);
}


/* ==========================================================================
   25. PROTECTION DU LAYOUT TIMELESS
   ========================================================================== */

/*
 * Ce fichier ne modifie volontairement pas :
 *
 * - position
 * - display
 * - width
 * - height
 * - margin
 * - padding
 * - flex
 * - grid
 * - overflow
 *
 * Le layout natif de Timeless reste donc maître de la mise en page.
 */
```