« MediaWiki:Common.css » : différence entre les versions
Apparence
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 2 : | Ligne 2 : | ||
/* Sommaire des pages flottant à droite */ | /* Sommaire des pages flottant à droite */ | ||
#toc { float: right; margin:0 0 1em 1em }; | #toc {float: right; margin:0 0 1em 1em } | ||
/* Classe pour les listes horizontales séparées par des puces. | |||
Adaptation de la classe 'hlist' de en:User:Edokter. | |||
(cf. [[mw:Snippets/Horizontal lists]]). */ | |||
body:not(.skin-minerva) .liste-horizontale ul, | |||
body:not(.skin-minerva) .liste-horizontale ol, | |||
body:not(.skin-minerva) .liste-horizontale li { | |||
display: inline; | |||
margin-left: 0; | |||
} | |||
body.skin-minerva .liste-horizontale ul, | |||
body.skin-minerva .liste-horizontale ol, | |||
body.skin-minerva .liste-horizontale li { | |||
display: inline; | |||
padding-left: 0; /* pour la skin Minerva, padding-left au lieu de margin-left */ | |||
} | |||
/* utilisation de la valeur de "min-width-breakpoint-desktop" */ | |||
/* https://doc.wikimedia.org/codex/latest/design-tokens/breakpoint.html */ | |||
@media (min-width: 1120px) { | |||
.liste-horizontale li { | |||
white-space: nowrap; | |||
} | |||
} | |||
.liste-horizontale li:not(:last-child)::after { | |||
content: "\A0· "; | |||
font-weight: bold; | |||
white-space: normal; /* nécessaire s'il n'y a pas d'espace entre les <li> dans le HTML */ | |||
} | |||
body:not(.skin-minerva) .liste-horizontale li > ul, | |||
body:not(.skin-minerva) .liste-horizontale li > ol { | |||
white-space: normal; | |||
} | |||
body.skin-minerva .liste-horizontale li > ul, | |||
body.skin-minerva .liste-horizontale li > ol { | |||
white-space: normal; | |||
margin-left: 0; /* pour la skin Minerva, override d'un style appliqué aux listes imbriquées */ | |||
} | |||
.liste-horizontale li > ul::before, | |||
.liste-horizontale li > ol::before { | |||
content: " ("; | |||
} | |||
.liste-horizontale li > ul::after, | |||
.liste-horizontale li > ol::after { | |||
content: ")"; | |||
} | |||
.liste-horizontale ol { | |||
counter-reset: listitem; | |||
} | |||
.liste-horizontale ol > li { | |||
counter-increment: listitem; | |||
} | |||
.liste-horizontale ol > li::before { | |||
content: counter(listitem) ".\A0"; | |||
} | |||
Version du 7 janvier 2024 à 14:53
/* Le CSS placé ici sera appliqué à tous les habillages. */
/* Sommaire des pages flottant à droite */
#toc {float: right; margin:0 0 1em 1em }
/* Classe pour les listes horizontales séparées par des puces.
Adaptation de la classe 'hlist' de en:User:Edokter.
(cf. [[mw:Snippets/Horizontal lists]]). */
body:not(.skin-minerva) .liste-horizontale ul,
body:not(.skin-minerva) .liste-horizontale ol,
body:not(.skin-minerva) .liste-horizontale li {
display: inline;
margin-left: 0;
}
body.skin-minerva .liste-horizontale ul,
body.skin-minerva .liste-horizontale ol,
body.skin-minerva .liste-horizontale li {
display: inline;
padding-left: 0; /* pour la skin Minerva, padding-left au lieu de margin-left */
}
/* utilisation de la valeur de "min-width-breakpoint-desktop" */
/* https://doc.wikimedia.org/codex/latest/design-tokens/breakpoint.html */
@media (min-width: 1120px) {
.liste-horizontale li {
white-space: nowrap;
}
}
.liste-horizontale li:not(:last-child)::after {
content: "\A0· ";
font-weight: bold;
white-space: normal; /* nécessaire s'il n'y a pas d'espace entre les <li> dans le HTML */
}
body:not(.skin-minerva) .liste-horizontale li > ul,
body:not(.skin-minerva) .liste-horizontale li > ol {
white-space: normal;
}
body.skin-minerva .liste-horizontale li > ul,
body.skin-minerva .liste-horizontale li > ol {
white-space: normal;
margin-left: 0; /* pour la skin Minerva, override d'un style appliqué aux listes imbriquées */
}
.liste-horizontale li > ul::before,
.liste-horizontale li > ol::before {
content: " (";
}
.liste-horizontale li > ul::after,
.liste-horizontale li > ol::after {
content: ")";
}
.liste-horizontale ol {
counter-reset: listitem;
}
.liste-horizontale ol > li {
counter-increment: listitem;
}
.liste-horizontale ol > li::before {
content: counter(listitem) ".\A0";
}