Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b171bbe816 |
@@ -178,6 +178,56 @@ Si votre app contournait l'un de ces bugs localement (`.surface-grouped` à la p
|
|||||||
matériau translucide, règle CSS applicative pour la troncature), ce contournement peut être
|
matériau translucide, règle CSS applicative pour la troncature), ce contournement peut être
|
||||||
retiré après la mise à jour vers v0.1.5.
|
retiré après la mise à jour vers v0.1.5.
|
||||||
|
|
||||||
|
## v0.1.6 — matières : repli opaque ; champs en 15px
|
||||||
|
|
||||||
|
Deux retours d'usage réel (app Cars), applicables à toutes les apps qui consomment le design
|
||||||
|
system.
|
||||||
|
|
||||||
|
### 1. La lisibilité d'une matière ne doit jamais dépendre du flou
|
||||||
|
|
||||||
|
Sans flou réel, une teinte translucide seule laisse le contenu dessous visible et net : le
|
||||||
|
texte du menu entre en collision avec celui de la page — illisible, pas juste « moins joli ».
|
||||||
|
Même à 85 % d'opacité un fantôme reste visible ; seul 100 % garantit la lisibilité.
|
||||||
|
|
||||||
|
`.material-control` et `.material-popover` (donc `TabBar`, `Toolbar`, `Surface material=
|
||||||
|
"control"|"popover"`) ont désormais un **fond opaque par défaut** (`var(--bg-grouped)`, token de
|
||||||
|
surface déjà vérifié en light et en dark). La translucidité et le flou ne s'activent qu'en
|
||||||
|
amélioration progressive : quand le moteur reconnaît `backdrop-filter` (`@supports`) **et** que
|
||||||
|
l'utilisateur n'a pas demandé de réduire la transparence (`prefers-reduced-transparency:
|
||||||
|
reduce`, là où le navigateur l'implémente). Rendu inchangé dans un navigateur standard.
|
||||||
|
`.material-panel` n'est pas concerné (toujours utilisé avec un scrim, cf. `Dialog`).
|
||||||
|
|
||||||
|
**Limite à connaître** : `@supports` ne teste que la *reconnaissance de la syntaxe*, jamais le
|
||||||
|
compositing GPU réel — et rien ne permet de le détecter, ni en CSS ni en JS (aucune API ne
|
||||||
|
donne accès au résultat d'un `backdrop-filter` : un canvas ne le capture pas). Une matière
|
||||||
|
translucide reste donc un **enrichissement pour du chrome** (barre d'onglets, toolbar) ; **tout
|
||||||
|
contenu dont la lisibilité est critique (un menu de navigation, par exemple) doit utiliser une
|
||||||
|
surface opaque** : `Surface level="grouped"`.
|
||||||
|
|
||||||
|
Si `getComputedStyle(el).backdropFilter` renvoie `"none"` sur un élément portant une classe
|
||||||
|
`.material-*`, ce n'est **pas** un échec du GPU : le computed style est le résultat de la
|
||||||
|
cascade, pas du rendu. Cela signifie que la déclaration n'est pas appliquée sur cet élément
|
||||||
|
précis (surcharge applicative, ex. un utilitaire Tailwind `backdrop-filter`/`backdrop-blur-none`,
|
||||||
|
ou classe absente). Dans un Chromium de test, le package renvoie bien `blur(46px) saturate(1.6)`
|
||||||
|
(control) et `blur(65px) saturate(1.6)` (popover) en light, `saturate(1.4)` en dark.
|
||||||
|
|
||||||
|
### 2. TextField et Select : 15px au lieu de 17px
|
||||||
|
|
||||||
|
Le texte de champ passe de `--text-body-size` (17px) à `--text-subheadline-size` (15px), avec
|
||||||
|
son interlignage (20px) et son tracking (`--text-subheadline-tracking`, `-0.23px`, valeur
|
||||||
|
observée dans le kit). Valable pour `size="regular"` et `"compact"`. Écart assumé par rapport à
|
||||||
|
la valeur auditée : le kit utilise 17pt dans des listes dont les libellés sont eux aussi en 17pt ;
|
||||||
|
les apps nApps ont des libellés plus petits (`caption1`, `subheadline`), et 17px ressortait
|
||||||
|
trop imposant.
|
||||||
|
|
||||||
|
**Audit de cohérence des tailles de police** (toutes les déclarations de `tokens.css`) :
|
||||||
|
tout vient de l'échelle de tokens, sauf `.segmented-control__item` qui utilisait un littéral
|
||||||
|
`13.3px` hors échelle — désormais `--text-footnote-size` (13px, écart de 0,3px). Restent à 17px,
|
||||||
|
valeur auditée : `Button` regular, `ListRow` (titre), `Dialog`, `Toolbar` (titre). **Point à
|
||||||
|
arbitrer** : un champ (15px) placé sous un titre de `ListRow` (17px) crée un léger décalage
|
||||||
|
d'échelle dans une même liste groupée — non modifié ici pour ne pas changer le rendu des apps en
|
||||||
|
prod ; à trancher si vous voulez harmoniser tout le chrome autour de 15px.
|
||||||
|
|
||||||
## Développer le package
|
## Développer le package
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@napps/design-system",
|
"name": "@napps/design-system",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Identité visuelle et bibliothèque de composants nApps — direction A4 (Précision / Vibrance)",
|
"description": "Identité visuelle et bibliothèque de composants nApps — direction A4 (Précision / Vibrance)",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@napps/design-system",
|
"name": "@napps/design-system",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Identité visuelle et bibliothèque de composants nApps — direction A4 (Précision / Vibrance)",
|
"description": "Identité visuelle et bibliothèque de composants nApps — direction A4 (Précision / Vibrance)",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
--text-headline-size: 17px; --text-headline-line: 22px; --text-headline-weight: 700; --text-headline-tracking: -0.43px;
|
--text-headline-size: 17px; --text-headline-line: 22px; --text-headline-weight: 700; --text-headline-tracking: -0.43px;
|
||||||
--text-body-size: 17px; --text-body-line: 22px; --text-body-weight: 400; --text-body-tracking: -0.43px;
|
--text-body-size: 17px; --text-body-line: 22px; --text-body-weight: 400; --text-body-tracking: -0.43px;
|
||||||
--text-callout-size: 16px; --text-callout-line: 21px; --text-callout-weight: 400;
|
--text-callout-size: 16px; --text-callout-line: 21px; --text-callout-weight: 400;
|
||||||
--text-subheadline-size: 15px; --text-subheadline-line: 20px; --text-subheadline-weight: 400;
|
--text-subheadline-size: 15px; --text-subheadline-line: 20px; --text-subheadline-weight: 400; --text-subheadline-tracking: -0.23px;
|
||||||
--text-footnote-size: 13px; --text-footnote-line: 18px; --text-footnote-weight: 400;
|
--text-footnote-size: 13px; --text-footnote-line: 18px; --text-footnote-weight: 400;
|
||||||
--text-caption1-size: 12px; --text-caption1-line: 16px; --text-caption1-weight: 400;
|
--text-caption1-size: 12px; --text-caption1-line: 16px; --text-caption1-weight: 400;
|
||||||
--text-caption2-size: 11px; --text-caption2-line: 13px; --text-caption2-weight: 400;
|
--text-caption2-size: 11px; --text-caption2-line: 13px; --text-caption2-weight: 400;
|
||||||
@@ -127,24 +127,49 @@
|
|||||||
(Popovers, blur 65px, ombre 0 10px 50px) — voir
|
(Popovers, blur 65px, ombre 0 10px 50px) — voir
|
||||||
figma-kit-audit.md.
|
figma-kit-audit.md.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
/* v0.1.6 — LA LISIBILITÉ NE DOIT JAMAIS DÉPENDRE DU FLOU. Sans flou
|
||||||
|
réel, une teinte translucide seule laisse le contenu dessous visible
|
||||||
|
et net — illisible, pas juste "moins joli" (constaté en usage réel :
|
||||||
|
même à 85 % d'opacité, un fantôme du texte dessous reste visible ;
|
||||||
|
seul 100 % garantit la lisibilité). Donc, pour control et popover :
|
||||||
|
fond OPAQUE par défaut (token de surface --bg-grouped, déjà vérifié
|
||||||
|
indépendamment en light ET dark — aucune valeur brute nouvelle), et
|
||||||
|
la translucidité + le flou ne s'activent qu'en amélioration
|
||||||
|
progressive, quand le moteur reconnaît backdrop-filter ET que
|
||||||
|
l'utilisateur n'a pas demandé de réduire la transparence (bloc
|
||||||
|
@media (prefers-reduced-transparency: reduce) en fin de section).
|
||||||
|
LIMITE ASSUMÉE : @supports ne teste que la reconnaissance de la
|
||||||
|
syntaxe, pas le compositing GPU réel — rien en CSS (ni en JS : aucune
|
||||||
|
API ne permet de lire le résultat d'un backdrop-filter) ne peut le
|
||||||
|
détecter. Une matière translucide reste donc un enrichissement pour du
|
||||||
|
chrome (tab bar, toolbar) ; tout contenu dont la lisibilité est
|
||||||
|
critique (ex. menu de navigation) doit utiliser une surface opaque
|
||||||
|
(.surface-grouped / Surface level="grouped"). */
|
||||||
.material-control {
|
.material-control {
|
||||||
background: rgba(255, 255, 255, 0.55);
|
background: var(--bg-grouped);
|
||||||
backdrop-filter: blur(46px) saturate(1.6);
|
|
||||||
-webkit-backdrop-filter: blur(46px) saturate(1.6);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.02);
|
0 8px 15px rgba(0, 0, 0, 0.02);
|
||||||
}
|
}
|
||||||
:root[data-theme="dark"] .material-control {
|
:root[data-theme="dark"] .material-control {
|
||||||
background: rgba(38, 41, 48, 0.5);
|
|
||||||
backdrop-filter: blur(46px) saturate(1.4);
|
|
||||||
-webkit-backdrop-filter: blur(46px) saturate(1.4);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.35);
|
0 8px 15px rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.material-control {
|
||||||
|
background: rgba(255, 255, 255, 0.55);
|
||||||
|
backdrop-filter: blur(46px) saturate(1.6);
|
||||||
|
-webkit-backdrop-filter: blur(46px) saturate(1.6);
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .material-control {
|
||||||
|
background: rgba(38, 41, 48, 0.5);
|
||||||
|
backdrop-filter: blur(46px) saturate(1.4);
|
||||||
|
-webkit-backdrop-filter: blur(46px) saturate(1.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.material-panel {
|
.material-panel {
|
||||||
background: rgba(255, 255, 255, 0.85);
|
background: rgba(255, 255, 255, 0.85);
|
||||||
@@ -168,23 +193,46 @@
|
|||||||
du popover light. Asymétrie assumée, à corriger si un jour une
|
du popover light. Asymétrie assumée, à corriger si un jour une
|
||||||
vraie extraction dark du popover est disponible. */
|
vraie extraction dark du popover est disponible. */
|
||||||
.material-popover {
|
.material-popover {
|
||||||
background: rgba(255, 255, 255, 0.72);
|
background: var(--bg-grouped);
|
||||||
backdrop-filter: blur(65px) saturate(1.6);
|
|
||||||
-webkit-backdrop-filter: blur(65px) saturate(1.6);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
||||||
0 10px 50px rgba(0, 0, 0, 0.3);
|
0 10px 50px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
:root[data-theme="dark"] .material-popover {
|
:root[data-theme="dark"] .material-popover {
|
||||||
background: rgba(38, 41, 48, 0.5);
|
|
||||||
backdrop-filter: blur(65px) saturate(1.4);
|
|
||||||
-webkit-backdrop-filter: blur(65px) saturate(1.4);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.35);
|
0 8px 15px rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.material-popover {
|
||||||
|
background: rgba(255, 255, 255, 0.72);
|
||||||
|
backdrop-filter: blur(65px) saturate(1.6);
|
||||||
|
-webkit-backdrop-filter: blur(65px) saturate(1.6);
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .material-popover {
|
||||||
|
background: rgba(38, 41, 48, 0.5);
|
||||||
|
backdrop-filter: blur(65px) saturate(1.4);
|
||||||
|
-webkit-backdrop-filter: blur(65px) saturate(1.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Réduire la transparence (réglage d'accessibilité, là où le moteur
|
||||||
|
implémente cette media query) : retour à la surface opaque. Placé
|
||||||
|
APRÈS les blocs @supports pour gagner à spécificité égale ; le
|
||||||
|
sélecteur dark est répété pour égaler la spécificité des règles
|
||||||
|
dark ci-dessus (une seule valeur, --bg-grouped s'adapte au thème). */
|
||||||
|
@media (prefers-reduced-transparency: reduce) {
|
||||||
|
.material-control,
|
||||||
|
:root[data-theme="dark"] .material-control,
|
||||||
|
.material-popover,
|
||||||
|
:root[data-theme="dark"] .material-popover {
|
||||||
|
background: var(--bg-grouped);
|
||||||
|
backdrop-filter: none;
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
COMPOSANTS de référence — construits uniquement à partir des
|
COMPOSANTS de référence — construits uniquement à partir des
|
||||||
@@ -236,7 +284,7 @@
|
|||||||
.segmented-control__item {
|
.segmented-control__item {
|
||||||
padding: 3px var(--space-4);
|
padding: 3px var(--space-4);
|
||||||
border-radius: var(--radius-pill);
|
border-radius: var(--radius-pill);
|
||||||
font-size: 13.3px;
|
font-size: var(--text-footnote-size);
|
||||||
font-weight: 510;
|
font-weight: 510;
|
||||||
color: var(--label-primary);
|
color: var(--label-primary);
|
||||||
min-height: 28px;
|
min-height: 28px;
|
||||||
@@ -295,6 +343,21 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
/* v0.1.6 — le texte de champ passe de Body (17px) à Subheadline (15px).
|
||||||
|
Le kit audité utilise 17pt dans une liste groupée où les libellés
|
||||||
|
voisins sont eux aussi en 17pt ; les apps nApps ont des libellés plus
|
||||||
|
petits (caption1 12px, subheadline 15px), et 17px ressortait trop
|
||||||
|
imposant à côté. Écart assumé par rapport à la valeur auditée, motivé
|
||||||
|
par la proportion avec le chrome nApps. Le sélecteur composé
|
||||||
|
(.text-field.text-body, spécificité 0,2,0) bat .text-body (0,1,0)
|
||||||
|
quel que soit l'ordre, que le champ vienne du composant React (qui
|
||||||
|
pose toujours .text-body) ou d'un usage direct des classes. */
|
||||||
|
.text-field,
|
||||||
|
.text-field.text-body {
|
||||||
|
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||||
|
letter-spacing: var(--text-subheadline-tracking);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
.text-field--placeholder { color: var(--label-tertiary); }
|
.text-field--placeholder { color: var(--label-tertiary); }
|
||||||
.text-field__cursor { width: 2px; height: 22px; border-radius: 10px; background: var(--napps-accent); }
|
.text-field__cursor { width: 2px; height: 22px; border-radius: 10px; background: var(--napps-accent); }
|
||||||
.text-field--compact {
|
.text-field--compact {
|
||||||
@@ -397,7 +460,8 @@
|
|||||||
border-top: 1px solid var(--separator);
|
border-top: 1px solid var(--separator);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: var(--space-5) 32px var(--space-5) var(--space-5);
|
padding: var(--space-5) 32px var(--space-5) var(--space-5);
|
||||||
font: var(--text-body-weight) var(--text-body-size)/var(--text-body-line) var(--font-family);
|
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||||
|
letter-spacing: var(--text-subheadline-tracking);
|
||||||
color: var(--label-primary);
|
color: var(--label-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
+79
-15
@@ -78,7 +78,7 @@
|
|||||||
--text-headline-size: 17px; --text-headline-line: 22px; --text-headline-weight: 700; --text-headline-tracking: -0.43px;
|
--text-headline-size: 17px; --text-headline-line: 22px; --text-headline-weight: 700; --text-headline-tracking: -0.43px;
|
||||||
--text-body-size: 17px; --text-body-line: 22px; --text-body-weight: 400; --text-body-tracking: -0.43px;
|
--text-body-size: 17px; --text-body-line: 22px; --text-body-weight: 400; --text-body-tracking: -0.43px;
|
||||||
--text-callout-size: 16px; --text-callout-line: 21px; --text-callout-weight: 400;
|
--text-callout-size: 16px; --text-callout-line: 21px; --text-callout-weight: 400;
|
||||||
--text-subheadline-size: 15px; --text-subheadline-line: 20px; --text-subheadline-weight: 400;
|
--text-subheadline-size: 15px; --text-subheadline-line: 20px; --text-subheadline-weight: 400; --text-subheadline-tracking: -0.23px;
|
||||||
--text-footnote-size: 13px; --text-footnote-line: 18px; --text-footnote-weight: 400;
|
--text-footnote-size: 13px; --text-footnote-line: 18px; --text-footnote-weight: 400;
|
||||||
--text-caption1-size: 12px; --text-caption1-line: 16px; --text-caption1-weight: 400;
|
--text-caption1-size: 12px; --text-caption1-line: 16px; --text-caption1-weight: 400;
|
||||||
--text-caption2-size: 11px; --text-caption2-line: 13px; --text-caption2-weight: 400;
|
--text-caption2-size: 11px; --text-caption2-line: 13px; --text-caption2-weight: 400;
|
||||||
@@ -127,24 +127,49 @@
|
|||||||
(Popovers, blur 65px, ombre 0 10px 50px) — voir
|
(Popovers, blur 65px, ombre 0 10px 50px) — voir
|
||||||
figma-kit-audit.md.
|
figma-kit-audit.md.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
/* v0.1.6 — LA LISIBILITÉ NE DOIT JAMAIS DÉPENDRE DU FLOU. Sans flou
|
||||||
|
réel, une teinte translucide seule laisse le contenu dessous visible
|
||||||
|
et net — illisible, pas juste "moins joli" (constaté en usage réel :
|
||||||
|
même à 85 % d'opacité, un fantôme du texte dessous reste visible ;
|
||||||
|
seul 100 % garantit la lisibilité). Donc, pour control et popover :
|
||||||
|
fond OPAQUE par défaut (token de surface --bg-grouped, déjà vérifié
|
||||||
|
indépendamment en light ET dark — aucune valeur brute nouvelle), et
|
||||||
|
la translucidité + le flou ne s'activent qu'en amélioration
|
||||||
|
progressive, quand le moteur reconnaît backdrop-filter ET que
|
||||||
|
l'utilisateur n'a pas demandé de réduire la transparence (bloc
|
||||||
|
@media (prefers-reduced-transparency: reduce) en fin de section).
|
||||||
|
LIMITE ASSUMÉE : @supports ne teste que la reconnaissance de la
|
||||||
|
syntaxe, pas le compositing GPU réel — rien en CSS (ni en JS : aucune
|
||||||
|
API ne permet de lire le résultat d'un backdrop-filter) ne peut le
|
||||||
|
détecter. Une matière translucide reste donc un enrichissement pour du
|
||||||
|
chrome (tab bar, toolbar) ; tout contenu dont la lisibilité est
|
||||||
|
critique (ex. menu de navigation) doit utiliser une surface opaque
|
||||||
|
(.surface-grouped / Surface level="grouped"). */
|
||||||
.material-control {
|
.material-control {
|
||||||
background: rgba(255, 255, 255, 0.55);
|
background: var(--bg-grouped);
|
||||||
backdrop-filter: blur(46px) saturate(1.6);
|
|
||||||
-webkit-backdrop-filter: blur(46px) saturate(1.6);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.02);
|
0 8px 15px rgba(0, 0, 0, 0.02);
|
||||||
}
|
}
|
||||||
:root[data-theme="dark"] .material-control {
|
:root[data-theme="dark"] .material-control {
|
||||||
background: rgba(38, 41, 48, 0.5);
|
|
||||||
backdrop-filter: blur(46px) saturate(1.4);
|
|
||||||
-webkit-backdrop-filter: blur(46px) saturate(1.4);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.35);
|
0 8px 15px rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.material-control {
|
||||||
|
background: rgba(255, 255, 255, 0.55);
|
||||||
|
backdrop-filter: blur(46px) saturate(1.6);
|
||||||
|
-webkit-backdrop-filter: blur(46px) saturate(1.6);
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .material-control {
|
||||||
|
background: rgba(38, 41, 48, 0.5);
|
||||||
|
backdrop-filter: blur(46px) saturate(1.4);
|
||||||
|
-webkit-backdrop-filter: blur(46px) saturate(1.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.material-panel {
|
.material-panel {
|
||||||
background: rgba(255, 255, 255, 0.85);
|
background: rgba(255, 255, 255, 0.85);
|
||||||
@@ -168,23 +193,46 @@
|
|||||||
du popover light. Asymétrie assumée, à corriger si un jour une
|
du popover light. Asymétrie assumée, à corriger si un jour une
|
||||||
vraie extraction dark du popover est disponible. */
|
vraie extraction dark du popover est disponible. */
|
||||||
.material-popover {
|
.material-popover {
|
||||||
background: rgba(255, 255, 255, 0.72);
|
background: var(--bg-grouped);
|
||||||
backdrop-filter: blur(65px) saturate(1.6);
|
|
||||||
-webkit-backdrop-filter: blur(65px) saturate(1.6);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.04),
|
||||||
0 10px 50px rgba(0, 0, 0, 0.3);
|
0 10px 50px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
:root[data-theme="dark"] .material-popover {
|
:root[data-theme="dark"] .material-popover {
|
||||||
background: rgba(38, 41, 48, 0.5);
|
|
||||||
backdrop-filter: blur(65px) saturate(1.4);
|
|
||||||
-webkit-backdrop-filter: blur(65px) saturate(1.4);
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
inset 0 1px 0 rgba(255, 255, 255, 0.06),
|
||||||
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
inset 0 -1px 0 rgba(0, 0, 0, 0.3),
|
||||||
0 8px 15px rgba(0, 0, 0, 0.35);
|
0 8px 15px rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.material-popover {
|
||||||
|
background: rgba(255, 255, 255, 0.72);
|
||||||
|
backdrop-filter: blur(65px) saturate(1.6);
|
||||||
|
-webkit-backdrop-filter: blur(65px) saturate(1.6);
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .material-popover {
|
||||||
|
background: rgba(38, 41, 48, 0.5);
|
||||||
|
backdrop-filter: blur(65px) saturate(1.4);
|
||||||
|
-webkit-backdrop-filter: blur(65px) saturate(1.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Réduire la transparence (réglage d'accessibilité, là où le moteur
|
||||||
|
implémente cette media query) : retour à la surface opaque. Placé
|
||||||
|
APRÈS les blocs @supports pour gagner à spécificité égale ; le
|
||||||
|
sélecteur dark est répété pour égaler la spécificité des règles
|
||||||
|
dark ci-dessus (une seule valeur, --bg-grouped s'adapte au thème). */
|
||||||
|
@media (prefers-reduced-transparency: reduce) {
|
||||||
|
.material-control,
|
||||||
|
:root[data-theme="dark"] .material-control,
|
||||||
|
.material-popover,
|
||||||
|
:root[data-theme="dark"] .material-popover {
|
||||||
|
background: var(--bg-grouped);
|
||||||
|
backdrop-filter: none;
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
COMPOSANTS de référence — construits uniquement à partir des
|
COMPOSANTS de référence — construits uniquement à partir des
|
||||||
@@ -236,7 +284,7 @@
|
|||||||
.segmented-control__item {
|
.segmented-control__item {
|
||||||
padding: 3px var(--space-4);
|
padding: 3px var(--space-4);
|
||||||
border-radius: var(--radius-pill);
|
border-radius: var(--radius-pill);
|
||||||
font-size: 13.3px;
|
font-size: var(--text-footnote-size);
|
||||||
font-weight: 510;
|
font-weight: 510;
|
||||||
color: var(--label-primary);
|
color: var(--label-primary);
|
||||||
min-height: 28px;
|
min-height: 28px;
|
||||||
@@ -295,6 +343,21 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
/* v0.1.6 — le texte de champ passe de Body (17px) à Subheadline (15px).
|
||||||
|
Le kit audité utilise 17pt dans une liste groupée où les libellés
|
||||||
|
voisins sont eux aussi en 17pt ; les apps nApps ont des libellés plus
|
||||||
|
petits (caption1 12px, subheadline 15px), et 17px ressortait trop
|
||||||
|
imposant à côté. Écart assumé par rapport à la valeur auditée, motivé
|
||||||
|
par la proportion avec le chrome nApps. Le sélecteur composé
|
||||||
|
(.text-field.text-body, spécificité 0,2,0) bat .text-body (0,1,0)
|
||||||
|
quel que soit l'ordre, que le champ vienne du composant React (qui
|
||||||
|
pose toujours .text-body) ou d'un usage direct des classes. */
|
||||||
|
.text-field,
|
||||||
|
.text-field.text-body {
|
||||||
|
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||||
|
letter-spacing: var(--text-subheadline-tracking);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
.text-field--placeholder { color: var(--label-tertiary); }
|
.text-field--placeholder { color: var(--label-tertiary); }
|
||||||
.text-field__cursor { width: 2px; height: 22px; border-radius: 10px; background: var(--napps-accent); }
|
.text-field__cursor { width: 2px; height: 22px; border-radius: 10px; background: var(--napps-accent); }
|
||||||
.text-field--compact {
|
.text-field--compact {
|
||||||
@@ -397,7 +460,8 @@
|
|||||||
border-top: 1px solid var(--separator);
|
border-top: 1px solid var(--separator);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: var(--space-5) 32px var(--space-5) var(--space-5);
|
padding: var(--space-5) 32px var(--space-5) var(--space-5);
|
||||||
font: var(--text-body-weight) var(--text-body-size)/var(--text-body-line) var(--font-family);
|
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||||
|
letter-spacing: var(--text-subheadline-tracking);
|
||||||
color: var(--label-primary);
|
color: var(--label-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user