This commit is contained in:
parent
ff2a3a25e5
commit
a4a99789a9
23 changed files with 294 additions and 298 deletions
|
|
@ -1,23 +1,12 @@
|
|||
/*
|
||||
* 1. Utilise un meilleur modèle de boîte.
|
||||
* 2. Fait que seul font-size puisse influencer la taille du texte.
|
||||
* 3. Applique les schémas de couleurs.
|
||||
* 4. Utilise une indentation plus étroite.
|
||||
* 5. Permet l'usage de propriétés intrinsèques comme auto ou fit-content dans les animations.
|
||||
*/
|
||||
html {
|
||||
box-sizing: border-box; /* 1 */
|
||||
tab-size: 2; /* 4 */
|
||||
color-scheme: dark light; /* 3 */
|
||||
interpolate-size: allow-keywords; /* 6 */
|
||||
/* stylelint-disable */
|
||||
-moz-text-size-adjust: none; /* 2 */
|
||||
-webkit-text-size-adjust: none; /* 2 */
|
||||
text-size-adjust: none; /* 2 */
|
||||
box-sizing: border-box;
|
||||
tab-size: 2;
|
||||
color-scheme: dark light;
|
||||
interpolate-size: allow-keywords;
|
||||
-moz-text-size-adjust: none;
|
||||
-webkit-text-size-adjust: none;
|
||||
text-size-adjust: none;
|
||||
block-size: 100%;
|
||||
/* stylelint-enable */
|
||||
|
||||
/* scrollbar-gutter: stable; */
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
@ -32,46 +21,24 @@ body {
|
|||
line-height: var(--line-height-comfortable);
|
||||
text-decoration-skip-ink: auto;
|
||||
text-rendering: geometricprecision;
|
||||
block-size: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Hérite le modèle de boîte de l'élément racine.
|
||||
* 2. Désactive toute marge pour partir de bases saines.
|
||||
* 3. Hérite toute propriété typographique et de couleur pour éviter des redéfinitions.
|
||||
*/
|
||||
*, *::before, *::after {
|
||||
box-sizing: inherit; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
padding: 0; /* 2 */
|
||||
font: inherit; /* 3 */
|
||||
font-feature-settings: inherit; /* 3 */
|
||||
font-variation-settings: inherit; /* 3 */
|
||||
color: inherit; /* 3 */
|
||||
letter-spacing: inherit; /* 3 */
|
||||
word-spacing: inherit; /* 3 */
|
||||
}
|
||||
|
||||
/* Utilise une couleur particulière pour l'arrière-plan des éléments sélectionnés avec le curseur. */
|
||||
*::selection {
|
||||
color: var(--color-secondary);
|
||||
background: var(--color-primary);
|
||||
}
|
||||
|
||||
/* TODO: Prendre en compte a11y-dialog */
|
||||
|
||||
/* Empêche le défilement de la page quand une modale est ouverte. */
|
||||
:where(html:has(dialog:modal[open])) {
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
/* Retire les bordures et applique un modèle d'arrière-plan plus sain. */
|
||||
*:where(:not(progress, meter)) {
|
||||
box-sizing: inherit;
|
||||
border: 0 solid transparent;
|
||||
background-repeat: no-repeat;
|
||||
background-origin: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
font-feature-settings: inherit;
|
||||
font-variation-settings: inherit;
|
||||
color: inherit;
|
||||
letter-spacing: inherit;
|
||||
word-spacing: inherit;
|
||||
}
|
||||
|
||||
/* Classe pour cacher visuellement tout en restant accessible par les lecteurs d'écran. */
|
||||
:where(.visually-hidden:not(:focus, :active, :focus-within)) {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
|
|
@ -81,17 +48,14 @@ body {
|
|||
clip-path: inset(50%);
|
||||
}
|
||||
|
||||
/* Cache les éléments cachés. */
|
||||
:where([hidden]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Affiche un curseur « Désactivé » pour les éléments désactivés. */
|
||||
:where([disabled]) {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Applique des contours de focus visibles. */
|
||||
:where(:focus-visible) {
|
||||
outline: currentcolor solid 0.2rem;
|
||||
outline-offset: 0.2rem;
|
||||
|
|
@ -101,12 +65,10 @@ body {
|
|||
scroll-margin-block: 8vh;
|
||||
}
|
||||
|
||||
/* Active une transition de page simple. */
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
|
||||
/* Désactive animations et transitions pour les Utilisateurs le demandant explicitement. */
|
||||
@media (prefers-reduced-motion) {
|
||||
*, *::before, *::after {
|
||||
scroll-behavior: auto !important;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue