@nxgt/material 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,7 +60,7 @@ Parts: `Avatar` (the composed one), `AvatarBase`, `AvatarImage`,
60
60
  | `shape` | `ShapeName` | — | clips the photo to one of the expressive shapes instead of a circle; the fallback is framed by it when there is no `src` or it fails to load. `alt` names it. Unset: the round avatar, unchanged |
61
61
  | `tone` | the eight named tones, or a tone of your own declared in `AppTones` | neutral | the fallback fills with the tone's container, draws its initials or icon in the tone's text colour (`--nxgt-tone-text`, also when there is no `tone`) and a hairline in it (3:1 against the page or card). A loaded photo is not tinted |
62
62
 
63
- The hairline's strength is `--avatar-ring-share`, the share of the tone's text colour mixed into the surface (default `65%`, from `--nxgt-tone-ring-share`; 3:1 or more at that value). Override it in your CSS:
63
+ The hairline's strength is `--avatar-ring-share`, the share of the tone's text colour mixed into the surface (default `68%`, from `--nxgt-tone-ring-share`; 3:1 or more at that value). Override it in your CSS:
64
64
 
65
65
  ```css
66
66
  :root { --avatar-ring-share: 80%; }
@@ -435,7 +435,7 @@ import { StatCard } from '@nxgt/material/components';
435
435
 
436
436
  Parts: the root carries `data-slot="stat-card"`, `data-variant` and, when a tone applies, `data-tone` (the tone, or `neutral` on a `tonal` or `filled` card without one); the icon wrapper carries `data-slot="stat-card-icon"`. The types `StatCardProps`, `StatCardVariant` and `StatCardValueSize` are exported.
437
437
 
438
- In `filled`, the delta and its trend arrow take the on-colour too (the arrow and the sign still say up or down). The outline's share is `--stat-card-ring-share` (`65%`, or `--nxgt-tone-ring-share` for every ring); it draws the tonal card's border, the filled card's edge in a calm zone and the hairline round the icon chip. Known limit: the dark theme's primary `filled` card has an edge of about 2.4:1 on a `Card` and 2.7:1 on the page (its text is 7:1); a `tonal` card avoids it. See [App tones](../guides/theming.md#app-tones-on-shape-fab-avatar-statcard-and-the-metric-cards).
438
+ In `filled`, the delta and its trend arrow take the on-colour too (the arrow and the sign still say up or down). The outline's share is `--stat-card-ring-share` (`68%`, or `--nxgt-tone-ring-share` for every ring); it draws the tonal card's border, the filled card's edge in a calm zone and the hairline round the icon chip. Known limit: the dark theme's primary `filled` card has an edge of about 2.3:1 on a `Card` and 2.5:1 on the page (its text is 7:1); a `tonal` card avoids it. See [App tones](../guides/theming.md#app-tones-on-shape-fab-avatar-statcard-and-the-metric-cards).
439
439
 
440
440
  **Storybook:** `Data display/StatCard`, `Data display/StatCard/Tones` · **Vue:** `StatCard`
441
441
 
@@ -90,6 +90,48 @@ container is the accent colour itself, the same as `bg-accent`.
90
90
 
91
91
  Put `text-foreground` on a container; it stays well above 4.5:1 in both themes.
92
92
 
93
+ ## The neutral palette
94
+
95
+ The neutrals of both themes are softly tinted toward violet (hue 290, low
96
+ chroma), to sit with the primary indigo instead of fighting it. The values:
97
+
98
+ | Token | Light | Dark |
99
+ | --- | --- | --- |
100
+ | `--background` | `oklch(0.973 0.008 293.9)` | `oklch(0.192 0.016 290.5)` |
101
+ | `--card`, `--popover` / `--sidebar` | white / `oklch(0.985 0.006 293.9)` | `oklch(0.232 0.019 289.4)` |
102
+ | `--foreground` | `oklch(0.227 0.017 290)` | `oklch(0.943 0.012 291.3)` |
103
+ | `--muted`, `--accent` | `oklch(0.955 0.012 292)`, `oklch(0.91 0.016 293)` | `oklch(0.27 0.022 290)` |
104
+ | `--muted-foreground` | `oklch(0.478 0.032 292)` | `oklch(0.725 0.03 292.2)` |
105
+ | `--border`, `--input` | `oklch(0.912 0.016 293.7)` | `oklch(0.301 0.025 291.4)`, `oklch(0.34 0.027 291.4)` |
106
+
107
+ Earlier versions used a blue-slate neutral (hue 247 to 266; the dark
108
+ background `oklch(0.14 0.036 258.53)` was a deep navy). To bring it back,
109
+ redefine the tokens after the stylesheet import, under the same selectors;
110
+ the main ones are below and the changelog of `@nxgt/material` 3.6.0 lists
111
+ every old value (accent, ring, sidebar, tooltip, secondary and the others):
112
+
113
+ ```css
114
+ :root {
115
+ --background: oklch(1 0 0);
116
+ --foreground: oklch(0.14 0.036 258.53);
117
+ --muted: oklch(0.968 0.007 247.896);
118
+ --muted-foreground: oklch(0.52 0.046 257.417);
119
+ --border: oklch(0.929 0.013 255.508);
120
+ --input: oklch(0.929 0.013 255.508);
121
+ }
122
+ .dark,
123
+ [data-theme="dark"] {
124
+ --background: oklch(0.14 0.036 258.53);
125
+ --foreground: oklch(0.984 0.003 247.858);
126
+ --card: oklch(0.208 0.042 265.755);
127
+ --popover: oklch(0.208 0.042 265.755);
128
+ --muted: oklch(0.279 0.041 260.031);
129
+ --muted-foreground: oklch(0.66 0.046 257.417);
130
+ --border: oklch(1 0 0 / 10%);
131
+ --input: oklch(1 0 0 / 15%);
132
+ }
133
+ ```
134
+
93
135
  ## Motion and shape tokens
94
136
 
95
137
  `styles.css` also carries Material 3 expressive motion and corner tokens, as
@@ -227,12 +269,12 @@ any tone, yours included:
227
269
  | `--nxgt-tone-on` | `text-tone-on` | what is drawn on it |
228
270
  | `--nxgt-tone-container` | `bg-tone-container` | a tint of it over the surface it sits on |
229
271
  | `--nxgt-tone-text` | `text-tone-text` | it as text on the page or its container |
230
- | `--nxgt-tone-ring-share` | — | the share of the text colour in the ring below (`65%`, set on `:root`) |
272
+ | `--nxgt-tone-ring-share` | — | the share of the text colour in the ring below (`68%`, set on `:root`) |
231
273
  | `--nxgt-tone-ring` | `border-(--nxgt-tone-ring)` | a hairline: its text colour mixed into the surface at that share, 3:1 against it |
232
274
 
233
275
  The ring is drawn by: the `Avatar` fallback (the inset hairline, or the stroke of a shaped one); the tonal `StatCard` outline, the edges of its filled card and the ring round its icon chip; the outline and rank badge of a toned metric card; and, in a [calm zone](#calm-zone), the edge of a tonal `Shape`, an `Avatar`, a `StatCard` and a rank badge once their container steps back.
234
276
 
235
- Which knob changes which ring: `--nxgt-tone-ring-share` is the shared one, and being inherited it works on `:root` (`:root { --nxgt-tone-ring-share: 80%; }` makes every ring stronger) or on a wrapper (only the rings inside it). A component with a knob of its own, `--avatar-ring-share` or `--stat-card-ring-share`, takes it over for that component only: it applies to the component's own element, it is not inherited by a tone nested inside it, and `--stat-card-ring-share` draws every edge of the `StatCard`. Keep a ring at 3:1 or more against its surface (65 % does in light and dark) when you change the share.
277
+ Which knob changes which ring: `--nxgt-tone-ring-share` is the shared one, and being inherited it works on `:root` (`:root { --nxgt-tone-ring-share: 80%; }` makes every ring stronger) or on a wrapper (only the rings inside it). A component with a knob of its own, `--avatar-ring-share` or `--stat-card-ring-share`, takes it over for that component only: it applies to the component's own element, it is not inherited by a tone nested inside it, and `--stat-card-ring-share` draws every edge of the `StatCard`. Keep a ring at 3:1 or more against its surface (68 % does in light and dark) when you change the share.
236
278
 
237
279
  ```tsx
238
280
  <span data-tone="success" className="bg-tone-container text-tone-text">
@@ -742,22 +784,22 @@ the rest yourself. Without the class the anchor keeps the prose style.
742
784
  ## Contrast and reduced motion
743
785
 
744
786
  **Contrast.** The shipped light palette keeps the text of every filled status
745
- colour at 4.5:1 or more (WCAG 1.4.3): `--secondary` 5.7:1, `--success` 5.6:1,
746
- `--info` 5.8:1 and `--warning` 5.5:1 against their `-foreground`, and
787
+ colour at 4.5:1 or more (WCAG 1.4.3): `--secondary` 6.2:1, `--success` 6.1:1,
788
+ `--info` 6.3:1 and `--warning` 5.5:1 against their `-foreground`, and
747
789
  `--secondary` as text (a `tonal`, `outlined` or `link` `Button`) 6.0:1 on
748
790
  `--background`, 4.8:1 on its own 15 % `tonal` tint.
749
791
 
750
792
  The dark theme keeps brighter values, read as text on the dark surfaces: the
751
- dark `--tertiary` (`oklch(0.7 0.15 310.75)`) is 7.0:1 on `--background` and
752
- 6.3:1 on `--card`, with a dark `--tertiary-foreground` that keeps 7.0:1 on
793
+ dark `--tertiary` (`oklch(0.7 0.15 310.75)`) is 6.5:1 on `--background` and
794
+ 5.9:1 on `--card`, with a dark `--tertiary-foreground` that keeps 6.5:1 on
753
795
  a filled tertiary surface (light: 7.6:1 under near-white). The dark
754
- `--secondary` (`oklch(0.66 0.1135 245.65)`) is 6.5:1 on `--background`
755
- and 5.8:1 on `--card` (a `tonal` secondary `Button` 5.4:1 and 4.6:1). Under
796
+ `--secondary` (`oklch(0.675 0.1135 245.65)`) is 6.3:1 on `--background`
797
+ and 5.8:1 on `--card` (a `tonal` secondary `Button` 5.1:1 and 4.6:1). Under
756
798
  near-white text those brights are too light, so every filled surface built on
757
799
  them is tinted in the dark theme: a filled `secondary` `Button`, `IconButton`
758
- or `Badge` at 70 % (5.2:1 on `--background`, 4.9:1 on `--card`), a filled
759
- `success`, `info` or `warning` one at 60 % (7.3:1, 5.7:1 and 6.0:1 on
760
- `--background`; 6.7:1, 5.3:1 and 5.6:1 on `--card`; the `warning` `Button` 6.5:1). Their hover, focus and
800
+ or `Badge` at 70 % (4.9 to 5.2:1 on `--background`, 4.7 to 4.9:1 on `--card`), a filled
801
+ `success`, `info` or `warning` one at 60 % (7.1:1, 5.6:1 and 5.8:1 on
802
+ `--background`; 6.8:1, 5.3:1 and 5.5:1 on `--card`; the `warning` `Button` 5.9:1). Their hover, focus and
761
803
  pressed states are tinted further down, so they only gain contrast.
762
804
 
763
805
  In the light theme the filled `primary`, `secondary`, `success`, `info`,
@@ -773,11 +815,11 @@ The `tonal`, `outlined` and `link` variants of `Button` and `IconButton` draw
773
815
  their text and icon in one tone per colour, read on `--background`, on
774
816
  `--card` and on the variant's own tint (15 % at most, at rest or focused). In
775
817
  the light theme `primary`, `secondary`, `info` and `success` use the token
776
- itself (5.8, 4.8, 4.9 and 4.7:1 at their lowest) and `warning` and `error` the
777
- token mixed with 15 % black (6.4 and 5.4:1). In the dark theme `primary` is
778
- mixed with 60 % white, the `--primary-text` token (8.1:1 on `--card`: the token itself is a dark indigo,
779
- 2.2:1), `success` and `warning` with 15 % white (5.0 and 6.3:1), `error` with
780
- 30 % white (5.9:1), and `secondary` and `info` use the token (4.6 and 5.3:1).
818
+ itself (5.4, 4.8, 4.9 and 4.7:1 at their lowest) and `warning` and `error` the
819
+ token mixed with 15 % black (6.0 and 5.0:1). In the dark theme `primary` is
820
+ mixed with 60 % white, the `--primary-text` token (7.7:1 at its lowest: the token itself is a dark indigo,
821
+ 2.2:1), `success` and `warning` with 15 % white (4.8 and 5.8:1), `error` with
822
+ 30 % white (5.5:1), and `secondary` and `info` use the token (4.6 and 5.0:1).
781
823
  The tones are mixed from the tokens (`color-mix(in oklab, var(--color-error)
782
824
  85%, black)`), so an override of a token moves its tone with it; a text colour
783
825
  of your own on one of those buttons (`className="text-primary-text"`) replaces the tone
@@ -796,32 +838,32 @@ the filled surface's near-white text below 4.5:1 (`0.62` gives 3.85:1).
796
838
  the light theme, 70 in the dark one), so a warning `Alert`, `Banner`, `Badge`
797
839
  or toast does not read as a failure. Light `oklch(0.52 0.13 62)` is 5.5:1
798
840
  under its near-white `-foreground`; dark `oklch(0.7 0.15 70)` reads as text at
799
- 7.3:1 on `--background` and 6.5:1 on `--card` (6.6 and 5.8:1 on its 10 % tint). An app that overrides `--warning` keeps its own
841
+ 6.7:1 on `--background` and 6.1:1 on `--card` (5.9 and 5.3:1 on its 10 % tint). An app that overrides `--warning` keeps its own
800
842
  value; one that keeps the shipped value sees its `bg-warning` and
801
843
  `text-warning` surfaces change hue, and re-checks its custom pairs.
802
844
 
803
845
  **A selected `DataTable` row** (`TableRow`, `data-state="selected"`) is a 15 %
804
846
  primary tint with `foreground` text, a bar on the inline-start edge of its
805
847
  first cell (`before:`, primary in the light theme, primary mixed with 60 %
806
- white in the dark one: 5.9:1 in light and 8.2:1 or more in dark against the
807
- row), and the checkbox, drawn in the same dark colour (8.2:1 or more). The
808
- tint is too light to be told from its neighbour alone (1.2:1 in light, 1.06 to
848
+ white in the dark one: 5.4:1 in light and 7.7:1 or more in dark against the
849
+ row), and the checkbox, drawn in the same dark colour (7.7:1 or more). The
850
+ tint is too light to be told from its neighbour alone (1.25:1 in light, 1.10 to
809
851
  1.11:1 in dark), which is what keeps the text at 4.5:1 or more on a page and on
810
- a `Card`: 15.9:1 in light, and in dark 17.5:1 on a page, 17.1:1 in a `DataTable`
811
- on a `Card` and 15.4:1 for a bare `TableRow` on a `Card`. Links and
812
- `text-muted-foreground` texts (drawn as `foreground` at 70 %) are 7.0:1 in
813
- light and 8.15:1 in dark for a bare row on a `Card`. A `text-error-text` text
852
+ a `Card`: 12.6:1 in light, and in dark 14.1:1 on a page, 12.9:1 in a `DataTable`
853
+ on a `Card` and for a bare `TableRow` on a `Card`. Links and
854
+ `text-muted-foreground` texts (drawn as `foreground` at 70 %) are 5.6:1 in
855
+ light and 7.0:1 in dark for a bare row on a `Card`. A `text-error-text` text
814
856
  keeps its colour. Do not
815
857
  put `text-primary-foreground` in a cell for a selected row: it is near-white
816
858
  on that tint.
817
859
 
818
860
  **Error text has a token of its own**, `--error-text` (`text-error-text`), so
819
861
  the fill can stay dark while the text is light enough to read. The light value
820
- is `color-mix(in oklab, var(--error) 94%, black)` (5.7:1 on `--background`
821
- and `--card`, 4.8:1 on the `bg-error/10` tint of a focused menu item, where
862
+ is `color-mix(in oklab, var(--error) 92%, black)` (5.6:1 on `--background`,
863
+ 6.0:1 on `--card`, 5.0:1 on the `bg-error/10` tint of a focused menu item, where
822
864
  `--error` gives 5.0 and 4.2:1); the dark one is
823
- `color-mix(in oklab, var(--error) 80%, white)`, 5.9:1 on `--background` and
824
- 5.3:1 on `--card`, where `--error` itself gives 4.2 and 3.8:1. Field messages,
865
+ `color-mix(in oklab, var(--error) 80%, white)`, 5.4:1 on `--background` and
866
+ 5.0:1 on `--card`, where `--error` itself gives 3.9 and 3.5:1. Field messages,
825
867
  `HelperText` in its error state, form, dialog and upload errors, a textarea's
826
868
  counter over its limit, the error lines of `Terminal`, a
827
869
  `variant="error"` menu item and the falling values of the metric cards use it.
@@ -846,7 +888,8 @@ the override on the root.
846
888
  **Primary text has a token of its own**, `--primary-text` (`text-primary-text`),
847
889
  for the same reason: the brand colour is a dark fill (it keeps near-white text
848
890
  readable on a button) and reads at only about 2:1 as text on the dark surfaces.
849
- The light value is `var(--primary)`; the dark one is
891
+ The light value is `color-mix(in oklab, var(--primary) 96%, black)` (primary
892
+ 4 % toward black, 7.3:1 on the violet page); the dark one is
850
893
  `color-mix(in oklab, var(--primary) 40%, white)` (primary mixed 60 % with
851
894
  white, the recipe of the tonal `Button` labels). `Typography tone="primary"`,
852
895
  the `Alert` primary icon, links, selected labels and the other primary text of
@@ -871,33 +914,33 @@ at rest, hovered, focused and pressed, the tracks and the tabs;
871
914
  tokens after an override.
872
915
 
873
916
  **Tabs.** An `underline` tab's active label is `--primary` in the light
874
- theme (7.3:1 on `--background` and `--card`, 6.7:1 on `--muted`) and
875
- `--primary` mixed with 60 % white in the dark one (10.0:1, 9.0:1 and 7.4:1);
917
+ theme (6.8:1 on `--background`, 7.3:1 on `--card`, 6.4:1 on `--muted`) and
918
+ `--primary` mixed with 60 % white in the dark one (9.3:1, 8.5:1 and 7.6:1);
876
919
  its bar and every tab's focus outline are `--primary` in the light theme and
877
- `--track-fill` in the dark one (at least 6.7:1 and 9.0:1 on those surfaces).
920
+ `--track-fill` in the dark one (at least 6.7:1 and 9.4:1 on those surfaces).
878
921
  An inactive label is `--muted-foreground`, and turns to `--foreground` when
879
922
  hovered. A `segmented` tab's active label is `--foreground` on the raised
880
- surface (19.9:1 light, 17.0:1 dark); that surface is only 1.1:1 to 1.2:1 on
881
- the track, so it has a `--muted-foreground` border (5.0:1 light, 4.7:1 dark
923
+ surface (17.1:1 light, 14.2:1 dark); that surface is only 1.1:1 to 1.2:1 on
924
+ the track, so it has a `--muted-foreground` border (5.8:1 light, 6.2:1 dark
882
925
  on the track), and the label also changes colour and weight. Storybook's
883
926
  `Guides/Theming/Contrast` story `Tabs` measures each label at rest, hovered
884
927
  and focused, the outline, the bar and the border, on the three surfaces, in
885
928
  both themes.
886
929
 
887
- `--muted-foreground` is 5.5:1 on `--background` and `--card`, 5.1:1 on the
888
- "paper" tint (`bg-background-paper`, 5 % primary) and 5.0:1 on `--muted` in
889
- the light theme; in the dark theme it is 6.4:1 on `--background`, 5.7:1 on
890
- `--card`, 6.3:1 on the paper tint and 4.7:1 on `--muted`. The dark `--muted`
891
- is a dark surface (`oklch(0.279 0.041 260.031)`, it was the light value, a
892
- near-white block on a dark page) and `--foreground` on it reaches 14.0:1.
930
+ `--muted-foreground` is 6.2:1 on `--background`, 6.7:1 on `--card`, 5.7:1 on the
931
+ "paper" tint (`bg-background-paper`, 5 % primary) and 5.8:1 on `--muted` in
932
+ the light theme; in the dark theme it is 7.5:1 on `--background`, 6.9:1 on
933
+ `--card`, 7.3:1 on the paper tint and 6.2:1 on `--muted`. The dark `--muted`
934
+ is a dark surface (`oklch(0.27 0.022 290)`, it was the light value, a
935
+ near-white block on a dark page) and `--foreground` on it reaches 12.8:1.
893
936
 
894
937
  **Tracks.** The empty part of a `Slider`, of the password strength meter and
895
938
  the `Drawer` handle use `--track` (`bg-track`), and the `Slider`'s range and
896
939
  thumb border `--track-fill` (`bg-track-fill`, `border-track-fill`). In the
897
- dark theme the track reaches 3.6:1 on `--background` and 3.2:1 on `--card`
940
+ dark theme the track reaches 3.5:1 on `--background` and 3.2:1 on `--card`
898
941
  (WCAG 1.4.11; `bg-muted`, a dark surface now, gave 1.4:1 and 1.2:1), and the
899
- fill 3.4:1 on the track. The light theme keeps a pale track (`--track` is the
900
- light `--muted`) and `--track-fill` is `--primary`: the thumb, 7.3:1 on the
942
+ fill 3.3:1 on the track. The light theme keeps a pale track (`--track` is the
943
+ light `--muted`) and `--track-fill` is `--primary`: the thumb, 6.8:1 on the
901
944
  page, shows the value. A track, bar, handle or divider of your own drawn with
902
945
  `bg-muted` is near invisible in the dark theme now that `--muted` is a dark
903
946
  surface: draw it with `bg-track`.
@@ -27,6 +27,7 @@ words in your error.
27
27
 
28
28
  - [Components render unstyled, with no error](#components-render-unstyled-with-no-error)
29
29
  - [A link is blue and underlined on hover and focus](#a-link-of-mine-or-of-a-component-is-blue-and-underlined-on-hover-and-focus)
30
+ - [The light and dark neutrals turned violet after upgrading to 3.6](#the-light-and-dark-neutrals-turned-violet-after-upgrading-to-36)
30
31
  - [Math renders in the system fonts](#math-renders-in-the-system-fonts)
31
32
  - [`<Icon>` renders nothing](#icon-renders-nothing)
32
33
  - [An accessibility audit reports low contrast on a badge, a button, a toast or a menu entry](#an-accessibility-audit-reports-low-contrast-on-a-badge-a-button-a-toast-or-a-menu-entry)
@@ -740,6 +741,34 @@ public/assets/icons/sprites/sharp-solid.svg ← <Icon name="atom" family="sharp"
740
741
 
741
742
  Serve one sheet per style you use, from your own Font Awesome Pro kit.
742
743
 
744
+ ### The light and dark neutrals turned violet after upgrading to 3.6
745
+
746
+ **When:** after `@nxgt/material` 3.6, the page, cards, borders and muted text
747
+ are softly violet-tinted (the dark background was a deep navy), and a
748
+ screenshot test, or a brand that sat on the old slate, no longer matches.
749
+ **Why:** the neutral tokens moved to hue 290 with low chroma in both themes
750
+ (the palette is listed in the [theming guide](guides/theming.md#the-neutral-palette)).
751
+ Primary and the status colours did not change, except that the light
752
+ `--secondary`, `--success` and `--info` and the dark `--secondary` moved
753
+ 0.02 in lightness, so their tonal tints keep 4.5:1 on the new page colour.
754
+ **Fix:** update the screenshots, or redefine the old neutrals after the
755
+ stylesheet import, under `:root` and `.dark, [data-theme="dark"]`:
756
+
757
+ ```css
758
+ .dark,
759
+ [data-theme="dark"] {
760
+ --background: oklch(0.14 0.036 258.53);
761
+ --card: oklch(0.208 0.042 265.755);
762
+ --popover: oklch(0.208 0.042 265.755);
763
+ --muted: oklch(0.279 0.041 260.031);
764
+ --border: oklch(1 0 0 / 10%);
765
+ }
766
+ ```
767
+
768
+ The [theming guide](guides/theming.md#the-neutral-palette) has the main old
769
+ values for both themes (the `:root` block too); the changelog of 3.6.0 lists
770
+ every one.
771
+
743
772
  ### An accessibility audit reports low contrast on a badge, a button, a toast or a menu entry
744
773
 
745
774
  **When:** axe (or Lighthouse) reports `color-contrast` on a `Badge` with
@@ -795,7 +824,7 @@ yours still fail, you override them.
795
824
  In the dark theme, a filled `secondary` `Button` gave its near-white text
796
825
  4.3:1, a `tonal` secondary one 3.9:1 (3.4:1 on `--card`), and a filled
797
826
  `success`, `info` or `warning` one 3.5:1, 2.5:1 and 3.4:1. The dark
798
- `--secondary` is brighter (`oklch(0.66 ...)`, 6.5:1 as text on
827
+ `--secondary` is brighter (`oklch(0.675 ...)`, 6.3:1 as text on
799
828
  `--background`), and the filled `secondary`, `success`, `info` and `warning`
800
829
  `Button`s and `IconButton`s are filled in the dark theme with an opaque mix
801
830
  toward `--background` (about 70 %), so their text keeps 4.5:1 over any backdrop.
@@ -872,12 +901,12 @@ subtitle colour of your own on a selected `ListTile` must reach 4.5:1 on
872
901
  ### An accessibility audit reports low contrast on error text in the dark theme
873
902
 
874
903
  **When:** an error message, a validation hint or a red value of your own, in
875
- the dark theme, fails 4.5:1 (about 4.2:1 on the page, 3.8:1 on a card); the
904
+ the dark theme, fails 4.5:1 (about 3.9:1 on the page, 3.5:1 on a card); the
876
905
  catalogue's own field messages pass.
877
906
  **Why:** it is drawn with `text-error`, the fill colour. The dark `--error` is
878
907
  kept dark enough for near-white text on a filled error surface, which makes it
879
908
  too dark to read as text on the dark surfaces. Error text has its own token,
880
- `--error-text`, lightened in the dark theme (5.9:1 on `--background`, 5.3:1 on
909
+ `--error-text`, lightened in the dark theme (5.4:1 on `--background`, 5.0:1 on
881
910
  `--card`).
882
911
  **Fix:** draw text with `text-error-text`; keep `text-error` for fills,
883
912
  borders and icons that stand alone. On a `Button` or `IconButton` drop the
@@ -3,52 +3,57 @@
3
3
  * after importing the stylesheet, under the same selectors. */
4
4
  :root {
5
5
  --radius: 0.625rem;
6
- --background: oklch(1 0 0);
7
- --foreground: oklch(0.14 0.036 258.53);
6
+ --background: oklch(0.973 0.008 293.9);
7
+ --foreground: oklch(0.227 0.017 290);
8
8
  --card: oklch(1 0 0);
9
- --card-foreground: oklch(0.129 0.042 264.695);
9
+ --card-foreground: oklch(0.227 0.017 290);
10
10
  --strix: oklch(45.91% 0.1864 310.75);
11
11
  --popover: oklch(1 0 0);
12
- --popover-foreground: oklch(0.129 0.042 264.695);
12
+ --popover-foreground: oklch(0.227 0.017 290);
13
13
  --primary: oklch(46% 0.1135 276.35);
14
14
  --primary-foreground: oklch(0.984 0.003 247.858);
15
15
  /* Primary drawn as text or an icon on a normal surface (`text-primary-text`):
16
- the colour itself in light; the dark theme lifts it. */
17
- --primary-text: var(--primary);
18
- --secondary: oklch(50% 0.1135 245.65);
16
+ the colour mixed 4 % toward black in light, which keeps it 7.3:1 or more on
17
+ the violet page (7.9:1 on a Card; the colour itself gives 6.8:1 on the
18
+ page); the dark theme lifts it. */
19
+ --primary-text: color-mix(in oklab, var(--primary) 96%, black);
20
+ /* --secondary, --success and --info are 0.02 darker than before: on the
21
+ violet page tint (--background, 97.3 %) their own 15 % tonal tint gave the
22
+ text 4.3 to 4.5:1; now 4.7:1 or more on the page and on a Card. */
23
+ --secondary: oklch(48% 0.1135 245.65);
19
24
  --secondary-foreground: oklch(0.984 0.003 247.858);
20
- --muted: oklch(0.968 0.007 247.896);
21
- --muted-foreground: oklch(0.52 0.046 257.417);
25
+ --muted: oklch(0.955 0.012 292);
26
+ --muted-foreground: oklch(0.478 0.032 292);
22
27
  /* Non-text (WCAG 1.4.11): the empty part of a slider, a meter, a drawer
23
28
  handle. Light keeps the pale track; the value reads from the thumb. */
24
- --track: oklch(0.968 0.007 247.896);
29
+ --track: oklch(0.955 0.012 292);
25
30
  --track-fill: var(--primary);
26
- --tooltip: oklch(0.446 0.043 257.281);
31
+ --tooltip: oklch(0.446 0.043 291);
27
32
  --tooltip-foreground: oklch(1 0 0);
28
- --accent: oklch(0.9182 0.0077 228.86);
29
- --accent-foreground: oklch(0.216 0.006 56.043);
33
+ --accent: oklch(0.91 0.016 293);
34
+ --accent-foreground: oklch(0.227 0.017 290);
30
35
  /* Darker than the dark theme's: near-white text on a filled error surface
31
36
  reaches 4.8:1 (4.6 at 0.577), and the colour as text 5.0:1 on white. */
32
37
  --error: oklch(0.56 0.245 27.325);
33
38
  --error-foreground: oklch(0.984 0.003 247.858);
34
39
  /* Error drawn as text (a field's message, HelperText, a focused error menu
35
- item): 5.7:1 on white and 4.8:1 on the menu's bg-error/10 tint, where
36
- --error itself gives 5.0 and 4.2:1. */
37
- --error-text: color-mix(in oklab, var(--error) 94%, black);
40
+ item): 6.0:1 on white and 5.0:1 on the menu's bg-error/10 tint (4.7:1 on that
41
+ tint over the violet page), where --error itself gives 5.0 and 4.2:1. */
42
+ --error-text: color-mix(in oklab, var(--error) 92%, black);
38
43
  /* The foregrounds are near-white: these three are dark enough for WCAG AA
39
44
  text (4.5:1) on them, and for the same colours used as text on white. */
40
- --success: oklch(0.48 0.118 184.704);
45
+ --success: oklch(0.46 0.118 184.704);
41
46
  --success-foreground: oklch(0.984 0.003 247.858);
42
- --info: oklch(0.5 0.165 254.624);
47
+ --info: oklch(0.48 0.165 254.624);
43
48
  --info-foreground: oklch(0.984 0.003 247.858);
44
49
  /* Amber, a hue apart from --error (27): a warning must not read as a
45
50
  failure. 5.7:1 as text on white, 5.0:1 on its 10% tint, 5.5:1 under near-white text. */
46
51
  --warning: oklch(0.52 0.13 62);
47
52
  --warning-foreground: oklch(0.984 0.003 247.858);
48
53
  --destructive: var(--error);
49
- --border: oklch(0.929 0.013 255.508);
50
- --input: oklch(0.929 0.013 255.508);
51
- --ring: oklch(0.704 0.04 256.788);
54
+ --border: oklch(0.912 0.016 293.7);
55
+ --input: oklch(0.912 0.016 293.7);
56
+ --ring: oklch(0.704 0.04 291);
52
57
  --chart-1: oklch(0.646 0.222 41.116);
53
58
  --chart-2: oklch(0.6 0.118 184.704);
54
59
  --chart-3: oklch(0.398 0.07 227.392);
@@ -74,63 +79,65 @@
74
79
  --chart-soft-4-ink: oklch(0.52 0.16 310);
75
80
  --chart-soft-5: oklch(0.9 0.05 25);
76
81
  --chart-soft-5-ink: oklch(0.56 0.15 25);
77
- --sidebar: oklch(0.984 0.003 247.858);
78
- --sidebar-foreground: oklch(0.129 0.042 264.695);
79
- --sidebar-primary: oklch(0.208 0.042 265.755);
82
+ --sidebar: oklch(0.985 0.006 293.9);
83
+ --sidebar-foreground: oklch(0.227 0.017 290);
84
+ --sidebar-primary: oklch(0.227 0.017 290);
80
85
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
81
- --sidebar-accent: oklch(0.968 0.007 247.896);
82
- --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
83
- --sidebar-border: oklch(0.929 0.013 255.508);
84
- --sidebar-ring: oklch(0.704 0.04 256.788);
86
+ --sidebar-accent: oklch(0.955 0.012 292);
87
+ --sidebar-accent-foreground: oklch(0.227 0.017 290);
88
+ --sidebar-border: oklch(0.912 0.016 293.7);
89
+ --sidebar-ring: oklch(0.704 0.04 291);
85
90
  }
86
91
 
87
92
  .dark,
88
93
  [data-theme="dark"] {
89
- --background: oklch(0.14 0.036 258.53);
90
- --foreground: oklch(0.984 0.003 247.858);
91
- --card: oklch(0.208 0.042 265.755);
92
- --card-foreground: oklch(0.984 0.003 247.858);
93
- --popover: oklch(0.208 0.042 265.755);
94
- --popover-foreground: oklch(0.984 0.003 247.858);
94
+ --background: oklch(0.192 0.016 290.5);
95
+ --foreground: oklch(0.943 0.012 291.3);
96
+ --card: oklch(0.232 0.019 289.4);
97
+ --card-foreground: oklch(0.943 0.012 291.3);
98
+ --popover: oklch(0.232 0.019 289.4);
99
+ --popover-foreground: oklch(0.943 0.012 291.3);
95
100
  --primary: oklch(46% 0.1135 276.35);
96
- --primary-foreground: oklch(0.984 0.003 247.858);
101
+ --primary-foreground: oklch(0.995 0.002 291.3);
97
102
  /* Mixed 60 % toward white (the tonal Button labels' recipe): readable as text
98
103
  on --background and --card. */
99
104
  --primary-text: color-mix(in oklab, var(--primary) 40%, white);
100
- /* Brighter than the light one: it is read as text on the dark surfaces (6.5:1
101
- on --background, 5.8:1 on --card); a filled secondary surface mixes it toward --background
102
- (the opaque 70 % mix) to keep 5.2:1 under its near-white text. */
103
- --secondary: oklch(0.66 0.1135 245.65);
104
- --secondary-foreground: oklch(0.984 0.003 247.858);
105
- --muted: oklch(0.279 0.041 260.031);
106
- --muted-foreground: oklch(0.66 0.046 257.417);
107
- /* 3.6:1 on --background, 3.2:1 on --card; the fill 3.4:1 on the track. */
108
- --track: oklch(0.52 0.03 257.417);
105
+ /* Brighter than the light one: it is read as text on the dark surfaces (6.3:1
106
+ on --background, 5.8:1 on --card; 4.6:1 on its own 15 % tonal tint over a
107
+ Card). A filled secondary surface mixes it toward --background (the opaque
108
+ 70 % mix) to keep 5.2:1 under its near-white text (4.9:1 over a Card). */
109
+ --secondary: oklch(0.675 0.1135 245.65);
110
+ --secondary-foreground: oklch(0.995 0.002 291.3);
111
+ --muted: oklch(0.27 0.022 290);
112
+ --muted-foreground: oklch(0.725 0.03 292.2);
113
+ /* 3.5:1 on --background, 3.2:1 on --card; the fill 3.3:1 on the track. */
114
+ --track: oklch(0.53 0.03 290);
109
115
  --track-fill: oklch(0.85 0.09 276.35);
110
- --tooltip: oklch(0.929 0.013 255.508);
111
- --tooltip-foreground: oklch(0.446 0.043 257.281);
112
- --accent: oklch(0.268 0.007 34.298);
113
- --accent-foreground: oklch(0.985 0.001 106.423);
116
+ --tooltip: oklch(0.925 0.012 291.3);
117
+ --tooltip-foreground: oklch(0.446 0.043 291);
118
+ --accent: oklch(0.27 0.022 290);
119
+ --accent-foreground: oklch(0.943 0.012 291.3);
114
120
  --error: oklch(0.577 0.245 27.325);
115
- --error-foreground: oklch(0.984 0.003 247.858);
121
+ --error-foreground: oklch(0.995 0.002 291.3);
116
122
  /* --error stays the fill under near-white text; as text it would give only
117
- 4.2:1 on --background and 3.8:1 on --card. Lightened, 5.9 and 5.3:1. */
123
+ 3.9:1 on --background and 3.5:1 on --card. Lightened, 5.4 and 5.0:1. */
118
124
  --error-text: color-mix(in oklab, var(--error) 80%, white);
119
125
  /* The light brights: on the dark surfaces they read as text and as the
120
- badge's 60% tint, which keeps its contrast (7.3, 5.7 and 7.5:1). */
126
+ badge's 60% tint, which keeps its contrast under near-white text (success
127
+ 7.1:1, info 5.6:1, error 9.1:1). */
121
128
  --success: oklch(0.6 0.118 184.704);
122
- --success-foreground: oklch(0.984 0.003 247.858);
129
+ --success-foreground: oklch(0.995 0.002 291.3);
123
130
  --info: oklch(0.707 0.165 254.624);
124
- --info-foreground: oklch(0.984 0.003 247.858);
125
- /* Amber too, as text: 7.3:1 on --background and 6.5:1 on --card, 6.6:1 and
126
- 5.8:1 on its 10% tint; the badge's 60% fill under near-white text is
127
- 6.0:1 on a page and 5.6:1 on a Card. */
131
+ --info-foreground: oklch(0.995 0.002 291.3);
132
+ /* Amber too, as text: 6.7:1 on --background and 6.1:1 on --card, 5.9:1 and
133
+ 5.3:1 on its 10% tint; the badge's 60% fill under near-white text is
134
+ 5.8:1 on a page and 5.5:1 on a Card. */
128
135
  --warning: oklch(0.7 0.15 70);
129
- --warning-foreground: oklch(0.984 0.003 247.858);
136
+ --warning-foreground: oklch(0.995 0.002 291.3);
130
137
  --destructive: oklch(0.704 0.191 22.216);
131
- --border: oklch(1 0 0 / 10%);
132
- --input: oklch(1 0 0 / 15%);
133
- --ring: oklch(0.551 0.027 264.364);
138
+ --border: oklch(0.301 0.025 291.4);
139
+ --input: oklch(0.34 0.027 291.4);
140
+ --ring: oklch(0.551 0.03 290);
134
141
  --chart-1: oklch(0.488 0.243 264.376);
135
142
  --chart-2: oklch(0.696 0.17 162.48);
136
143
  --chart-3: oklch(0.769 0.188 70.08);
@@ -138,7 +145,7 @@
138
145
  --chart-5: oklch(0.645 0.246 16.439);
139
146
  /* The soft palette on the dark card: mid-tone fills (L 0.49, the sand a
140
147
  warmer 0.5 0.1 75), light inks of the same hues. Ink on the card:
141
- 1 8.90:1, 2 10.01, 3 10.80, 4 8.48, 5 8.52; at the 0.85 dim 6.44:1 or
148
+ 1 8.44:1, 2 9.46, 3 10.17, 4 8.03, 5 8.06; at the 0.85 dim 6.17:1 or
142
149
  more. Ink on its own fill (the outline): 1 3.13:1, 2 3.40, 3 3.69,
143
150
  4 3.11, 5 3.13. Every pair at least 54 degrees and ΔEOK 0.109 apart. */
144
151
  --chart-soft-1: oklch(0.49 0.08 255);
@@ -151,14 +158,14 @@
151
158
  --chart-soft-4-ink: oklch(0.78 0.13 310);
152
159
  --chart-soft-5: oklch(0.49 0.09 25);
153
160
  --chart-soft-5-ink: oklch(0.78 0.11 25);
154
- --sidebar: oklch(0.208 0.042 265.755);
155
- --sidebar-foreground: oklch(0.984 0.003 247.858);
161
+ --sidebar: oklch(0.232 0.019 289.4);
162
+ --sidebar-foreground: oklch(0.943 0.012 291.3);
156
163
  --sidebar-primary: oklch(0.488 0.243 264.376);
157
- --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
158
- --sidebar-accent: oklch(0.279 0.041 260.031);
159
- --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
160
- --sidebar-border: oklch(1 0 0 / 10%);
161
- --sidebar-ring: oklch(0.551 0.027 264.364);
164
+ --sidebar-primary-foreground: oklch(0.995 0.002 291.3);
165
+ --sidebar-accent: oklch(0.27 0.022 290);
166
+ --sidebar-accent-foreground: oklch(0.943 0.012 291.3);
167
+ --sidebar-border: oklch(0.301 0.025 291.4);
168
+ --sidebar-ring: oklch(0.551 0.03 290);
162
169
  }
163
170
 
164
171
  /* The tertiary colour (the strix violet), for accents and backgrounds beside
@@ -168,10 +175,10 @@
168
175
  --tertiary-foreground: oklch(0.984 0.003 247.858);
169
176
  }
170
177
 
171
- /* Dark: lifted like --secondary, as it is read as text (7.0:1 on --background,
172
- 6.3:1 on --card); its foreground is the dark surface, 7.0:1 on the fill. */
178
+ /* Dark: lifted like --secondary, as it is read as text (6.5:1 on --background,
179
+ 5.9:1 on --card); its foreground is the dark surface, 6.5:1 on the fill. */
173
180
  .dark,
174
181
  [data-theme="dark"] {
175
182
  --tertiary: oklch(0.7 0.15 310.75);
176
- --tertiary-foreground: oklch(0.14 0.036 258.53);
183
+ --tertiary-foreground: oklch(0.192 0.016 290.5);
177
184
  }
@@ -23,14 +23,14 @@
23
23
  * one, which the zone never touches. */
24
24
  --nxgt-tint-status: 20%;
25
25
  /* The share of the tone's text colour in a hairline (--nxgt-tone-ring): 3:1
26
- * or more against the surface in light and dark at 65 %. */
27
- --nxgt-tone-ring-share: 65%;
26
+ * or more against the surface in light and dark at 68 %. */
27
+ --nxgt-tone-ring-share: 68%;
28
28
 
29
29
  /* Neutral, the grey tone: the muted foreground, on the page colour. */
30
30
  --neutral: var(--muted-foreground);
31
31
  --neutral-foreground: var(--background);
32
32
 
33
- /* Text: the tone darkened (80 % tone, 20 % black), 6.6:1 or more on
33
+ /* Text: the tone darkened (80 % tone, 20 % black), 6.1:1 or more on
34
34
  * --background and --card and on its own container (over either). Primary and error keep
35
35
  * the tokens theme-tokens.css defines. */
36
36
  --secondary-text: color-mix(in oklab, var(--secondary) 80%, black);
@@ -88,8 +88,8 @@
88
88
  --neutral-text: color-mix(in oklab, var(--neutral) 75%, white);
89
89
 
90
90
  /* On the fill: the dark theme lifts these tones, and near-white on them
91
- * would give 2.5 to 3.5:1. The page colour is 5.4:1 or more on each.
92
- * Primary, tertiary and error keep their foreground (7.0, 7.0, 4.6:1). */
91
+ * would give 2.5 to 3.5:1. The page colour is 5.0:1 or more on each.
92
+ * Primary, tertiary and error keep their foreground (7.2, 6.5, 4.7:1). */
93
93
  --primary-on: var(--primary-foreground);
94
94
  --tertiary-on: var(--tertiary-foreground);
95
95
  --error-on: var(--error-foreground);
@@ -27,7 +27,7 @@
27
27
  --chip-face: var(--background);
28
28
  border-color: var(--chip-line);
29
29
  background: var(--chip-face);
30
- box-shadow: 0 1px 1px oklch(0.2 0.03 265 / 0.05);
30
+ box-shadow: 0 1px 1px oklch(0.2 0.03 290 / 0.05);
31
31
  }
32
32
  .nxgt-chip[data-look="hairline"][data-size="sm"] {
33
33
  --chip-r: 0.4375rem;
@@ -20,7 +20,7 @@
20
20
  .dark,
21
21
  [data-theme="dark"] {
22
22
  /* The dark theme's primary is too dark to read on its surfaces (2.5:1), so
23
- * the rail's label is a saturated lavender of its hue (6.3:1: lightness
23
+ * the rail's label is a saturated lavender of its hue (5.3:1: lightness
24
24
  * 0.72, chroma 0.15) on a denser pill (30 %, 35 % hovered). Light keeps the
25
25
  * lightness and chroma of primary (the `l` and `c` fallbacks). */
26
26
  --nxgt-sidebar-active-share: 30%;
@@ -10,10 +10,10 @@
10
10
  * motion: reduced-motion.css ends every animation at once. */
11
11
  @layer components {
12
12
  .nxgt-scrim {
13
- background-color: oklch(0.2 0.035 265 / 0.42);
13
+ background-color: oklch(0.2 0.035 290 / 0.42);
14
14
  }
15
15
  :where(.dark, [data-theme="dark"]) .nxgt-scrim {
16
- background-color: oklch(0.04 0.01 265 / 0.62);
16
+ background-color: oklch(0.04 0.01 290 / 0.62);
17
17
  }
18
18
  .nxgt-scrim[data-scrim="blur"] {
19
19
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
@@ -26,7 +26,7 @@
26
26
  var(--error) 5%,
27
27
  var(--background)
28
28
  );
29
- --nxgt-field-border: color-mix(in oklab, var(--foreground) 13%, transparent);
29
+ --nxgt-field-border: color-mix(in oklab, var(--foreground) 14%, transparent);
30
30
  --nxgt-field-border-hover: color-mix(
31
31
  in oklab,
32
32
  var(--foreground) 24%,
@@ -13,8 +13,8 @@
13
13
  --tg-pill: color-mix(in oklab, var(--primary) 10%, var(--background));
14
14
  --tg-ring: color-mix(in oklab, var(--primary-text) 82%, var(--background));
15
15
  --tg-lift:
16
- 0 1px 2px oklch(0.2 0.04 265 / 0.1),
17
- 0 2px 6px -2px oklch(0.2 0.04 265 / 0.12);
16
+ 0 1px 2px oklch(0.2 0.04 290 / 0.1),
17
+ 0 2px 6px -2px oklch(0.2 0.04 290 / 0.12);
18
18
  --tg-i: 0;
19
19
  --tg-n: 1;
20
20
  position: relative;