2025-02-21

This commit is contained in:
gcch 2025-02-21 23:23:22 +01:00
commit 5d5918f0d7
69 changed files with 1481 additions and 305 deletions

119
src/styles/base/base.css Executable file
View file

@ -0,0 +1,119 @@
/*
* 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 */
block-size: 100%;
/* stylelint-enable */
/* scrollbar-gutter: stable; */
}
body {
accent-color: var(--color-tertiary);
background: var(--color-secondary);
--webkit-font-smoothing: antialiased;
font-family: monospace, system-ui, sans-serif;
font-optical-sizing: auto;
font-kerning: normal;
font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures
contextual;
line-height: var(--line-height-comfortable);
text-decoration-skip-ink: auto;
text-rendering: geometricprecision;
}
/*
* 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)) {
background-repeat: no-repeat;
background-origin: border-box;
border: 0 solid transparent;
}
/* 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;
inline-size: 1px;
block-size: 1px;
white-space: nowrap;
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;
}
:where(:focus-visible, :target) {
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;
transition: none !important;
animation-duration: 0s !important;
}
@view-transition {
navigation: none !important;
}
}