@jungherz-de/glasskit 1.24.0 → 1.26.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,38 @@ GlassKit uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.26.0] – 2026-10-18
11
+
12
+ ### Added
13
+
14
+ - **`--gl-color-primary-text`, the primary as text.** The primary did two jobs: as a fill under white text — buttons, the checked toggle, the current step, the chosen day — and as text straight on the page or the glass: links in `.glass-prose`, the icon and label of the active tab, `.glass-modal__action--primary`, `.glass-list__item--accent`, `.glass-range-value`, the accordion trigger on hover and the chevron of an open item. A brand that darkens its primary in the dark theme so that white button text passes 4.5:1 got text too dark to read, and could not lighten it without changing every button. These eight rules take `--gl-color-primary-text` now, declared in both themes as `var(--gl-color-primary)`, so nothing changes until a project sets it. Measured on GlassKit's own dark background with `#c25028` as primary at 390 px, with `color-mix(in srgb, var(--gl-color-primary) 18%, #ffffff)` in the dark theme: a link on the page goes from 2.00:1 to 7.37:1, a link on a glass card from 1.37:1 to 5.05:1, the value of a range on a card from 1.78:1 to 6.55:1, the label of the active floating tab from 2.24:1 to 8.28:1. An accent row of a list on a card, the lightest place, goes from 1.06:1 to 3.47:1; white reaches 4.41:1 there. Docs, README, SKILL.md and `theme-override.css` show the recipe, with the light rule after the dark one, because `:root` matches a page in the light theme too. ([#12](https://github.com/JUNGHERZ/GlassKit/issues/12))
15
+ - **`--gl-tab-bar-active-color`** colours the icon and label of the active tab alone, where it is set; unset, they take `--gl-color-primary-text`. The spotlight of the floating bar lightens the active item more than any other surface, so a brand may need a lighter tone there than in running text. Glow and dot stay in the primary, the spotlight in `--gl-tab-bar-spotlight-color`. ([#12](https://github.com/JUNGHERZ/GlassKit/issues/12))
16
+
17
+ With the tokens unset, docs, showcase and landing pages of GlassKit and GlassKit Elements render pixel-identical to 1.25.0 in Chromium, WebKit and Firefox. Both tokens reach the shadow roots of GlassKit Elements by inheritance, with and without `glasskit.css` on the page. Checked in all three engines for plain markup and for the elements, in both themes, at the top of the page and in a nested `data-theme="light"` scope, which keeps the light primary.
18
+
19
+ ---
20
+
21
+ ## [1.25.0] – 2026-10-16
22
+
23
+ ### Added
24
+
25
+ - **Tint surfaces: `data-surface="tint"`.** The solid preset mixes each surface over `--gl-color-bg-mid`, which fits a page whose background is the theme's middle colour. On a page with a background of its own — a brand colour, a photo, a pattern — an opaque surface stood out as a foreign block. The tint preset makes the surfaces in the flow of the page see-through tints of the text colour (`--gl-surface-1` … `-5` at 4, 6, 9, 12 and 16 %, the card glow likewise), nothing blurred: a field on a card stays as see-through as the card, and its contrast follows the text. What lies over other content keeps the solid values — modal, sheet, popover, toast and the tab bars, with the fields and rows inside them — and so do the milk surfaces, because a see-through secondary button would lose its dark text on a dark page. The solid values are kept as `--gl-solid-surface-1` … `-5` and `--gl-solid-card-glow-*` and follow `--gl-color-bg-mid`, so a brand sets that to its own colour. The solid preset is built on them now and renders pixel-identical to 1.24.0. Measured in Chromium, WebKit and Firefox, in both themes: of 19 elements rendered over red and over blue — plain and GlassKit Elements, one nested `data-theme` scope among them — the ones in the flow show the page through, while the panels, the secondary button and a field inside a popover do not; `<glk-modal>`'s panel is opaque inside its shadow root; nothing is blurred. The showcase switch has a third option. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
26
+ - **`--gl-blur-overlay`, a blur behind dialogs that the presets leave alone.** `.glass-modal-overlay` and `.glass-sheet-overlay` blur with it where it is set, else with `--gl-blur-soft` as before, which the surface presets set to `0`. A blurred dimmer suits a page without glass as well. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
27
+ - **Toggle track tokens:** `--gl-toggle-track-bg` and `--gl-toggle-track-bg-checked`; unset, `--gl-surface-2` and the primary gradient. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
28
+ - **Radio tokens:** `--gl-radio-bg`, `--gl-radio-bg-checked`, `--gl-radio-border`, `--gl-radio-border-checked`, `--gl-radio-dot-size` and `--gl-radio-dot-color`; unset, today's values. A ring in the text colour that turns the accent colour takes six declarations, shown in the docs. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
29
+ - **`--gl-textarea-field-sizing`:** `content` lets text areas grow with their text where `field-sizing` is supported. It is off by default because it ignores `rows`: a text area with `rows="8"` would shrink from 214 to 120 px. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
30
+ - **`--gl-input-picker-icon`:** `none` hides Chromium's picker button of date and time fields, and the arrow of a datalist, for a field whose prefix is the picker. Unset, every browser keeps its own (`revert`). ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
31
+
32
+ ### Fixed
33
+
34
+ - **An empty `.glass-label` takes no room.** It kept the input group's 8px gap above its field. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
35
+ - **A long value or placeholder in `.glass-input` ends in an ellipsis** while the field is not being edited, instead of being cut off. ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
36
+ - **A read-only or disabled text area has no resize handle.** ([#11](https://github.com/JUNGHERZ/GlassKit/issues/11))
37
+
38
+ With the presets and the new tokens unset, docs, showcase and landing pages of GlassKit and GlassKit Elements render pixel-identical to 1.24.0 in Chromium and WebKit.
39
+
40
+ ---
41
+
10
42
  ## [1.24.0] – 2026-10-14
11
43
 
12
44
  ### Added
@@ -1096,6 +1128,8 @@ during development. Version 1.3 is the first public open-source release.
1096
1128
 
1097
1129
  ---
1098
1130
 
1131
+ [1.26.0]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.26.0
1132
+ [1.25.0]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.25.0
1099
1133
  [1.24.0]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.24.0
1100
1134
  [1.23.0]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.23.0
1101
1135
  [1.22.2]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.22.2
@@ -1132,4 +1166,4 @@ during development. Version 1.3 is the first public open-source release.
1132
1166
  [1.3.2]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.3.2
1133
1167
  [1.3.1]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.3.1
1134
1168
  [1.3.0]: https://github.com/JUNGHERZ/GlassKit/releases/tag/v1.3.0
1135
- [Unreleased]: https://github.com/JUNGHERZ/GlassKit/compare/v1.24.0...HEAD
1169
+ [Unreleased]: https://github.com/JUNGHERZ/GlassKit/compare/v1.25.0...HEAD
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://img.shields.io/badge/version-1.24.0-orange?style=flat-square" alt="Version">
2
+ <img src="https://img.shields.io/badge/version-1.26.0-orange?style=flat-square" alt="Version">
3
3
  <img src="https://img.shields.io/badge/CSS-only-blue?style=flat-square" alt="CSS only">
4
4
  <img src="https://img.shields.io/badge/components-34-green?style=flat-square" alt="Components">
5
5
  <img src="https://img.shields.io/badge/license-MIT-lightgrey?style=flat-square" alt="License">
6
- <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/changelog-v1.24.0-f5a623?style=flat-square" alt="Changelog"></a>
6
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/changelog-v1.26.0-f5a623?style=flat-square" alt="Changelog"></a>
7
7
  <a href="https://www.npmjs.com/package/@jungherz-de/glasskit"><img src="https://img.shields.io/npm/v/@jungherz-de/glasskit?style=flat-square&color=cb3837&label=npm" alt="npm"></a>
8
8
  <a href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit/"><img src="https://img.shields.io/badge/CDN-jsDelivr-blue?style=flat-square" alt="jsDelivr"></a>
9
9
  </p>
@@ -72,16 +72,16 @@ No download, no build tool – just include and go:
72
72
 
73
73
  ```html
74
74
  <!-- jsDelivr – Minified -->
75
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.24/glasskit.min.css">
75
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.26/glasskit.min.css">
76
76
 
77
77
  <!-- jsDelivr – Unminified (for reading/debugging) -->
78
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.24/glasskit.css">
78
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/glasskit@1.26/glasskit.css">
79
79
 
80
80
  <!-- unpkg – Alternative -->
81
- <link rel="stylesheet" href="https://unpkg.com/@jungherz-de/glasskit@1.24/glasskit.min.css">
81
+ <link rel="stylesheet" href="https://unpkg.com/@jungherz-de/glasskit@1.26/glasskit.min.css">
82
82
  ```
83
83
 
84
- > **Tip:** Replace `@1.24` with `@latest` for the newest version – or pin to a specific version for maximum stability.
84
+ > **Tip:** Replace `@1.26` with `@latest` for the newest version – or pin to a specific version for maximum stability.
85
85
 
86
86
  ### npm / yarn / pnpm
87
87
 
@@ -274,6 +274,20 @@ substituted where it is *declared*, so a brand set on a subtree does not re-deri
274
274
  tokens inherited from `:root`. Every derived token is still a plain default and loses to
275
275
  a later declaration if you want to bend one.
276
276
 
277
+ **Primary as text (since 1.26.0).** Links in `.glass-prose`, the icon and label of the active tab, the primary modal action, accent list rows, the value of a range and the accordion draw text in `--gl-color-primary-text`, which is the primary unless you set it. A brand that darkens its primary for white button text lightens the text in the dark theme instead, and the buttons keep their colour:
278
+
279
+ ```css
280
+ :root, [data-theme="dark"] {
281
+ --gl-color-primary-text: color-mix(in srgb, var(--gl-color-primary) 18%, #ffffff);
282
+ }
283
+ /* after the dark rule: :root matches a page in the light theme too */
284
+ [data-theme="light"] {
285
+ --gl-color-primary-text: var(--gl-color-primary);
286
+ }
287
+ ```
288
+
289
+ `--gl-tab-bar-active-color` colours the icon and label of the active tab alone, for a spotlight that needs a lighter tone still; unset, they take `--gl-color-primary-text`.
290
+
277
291
  The `theme-override.css` template comes with **4 example themes**:
278
292
  - 🔵 Ocean Blue
279
293
  - 🟢 Emerald Green
@@ -318,7 +332,7 @@ Every token can also be set on its own, for one density or both — the toggle's
318
332
 
319
333
  Like `data-theme`, keep `data-density` on `<html>`: an element further down that carries `data-theme="dark"` re-declares the dark block, the default sizes included.
320
334
 
321
- ### Solid surfaces
335
+ ### Solid and tint surfaces
322
336
 
323
337
  Not every screen wants glass — admin screens, forms on a plain background, designs without it. Since **1.24.0** `data-surface="solid"` on `<html>` makes every surface opaque and turns blur and gloss off:
324
338
 
@@ -334,6 +348,18 @@ Each surface takes the colour the glass shows over the theme's middle background
334
348
 
335
349
  GlassKit Elements carries the attribute into its shadow roots, as it does with `data-theme`.
336
350
 
351
+ A page with a background of its own — a brand colour, a photo, a pattern — takes `data-surface="tint"` instead (since **1.25.0**). The surfaces in the flow of the page become see-through tints of the text colour, nothing blurred, so a field on a card stays as see-through as the card. What lies over other content (modal, sheet, popover, toast, the tab bars) and the secondary button keep the solid values, which come from `--gl-color-bg-mid` — set it to a colour of your brand:
352
+
353
+ ```html
354
+ <html data-theme="dark" data-surface="tint">
355
+ ```
356
+
357
+ ```css
358
+ [data-surface='tint'] { --gl-color-bg-mid: #5c1310; } /* panels in a dark red */
359
+ ```
360
+
361
+ Both presets set the blur tokens to 0 but leave `--gl-blur-overlay` alone: set it to keep a blurred dimmer behind dialogs.
362
+
337
363
  ### Printing
338
364
 
339
365
  Print dialogs leave out background graphics by default, and some states are drawn with a background only. Since **1.21.1** those parts keep their colours on paper — the checked box and its tick, the chosen radio, the toggle's track, the progress fill, the current step, the chosen day of date strip and calendar, the slider thumb and the tone dots — while the rest of the page prints economically. Nothing to set.
@@ -361,6 +387,7 @@ All visual values are controlled via CSS Custom Properties:
361
387
  ```css
362
388
  /* Colors */
363
389
  --gl-color-primary /* Primary color */
390
+ --gl-color-primary-text /* text and line icons in the primary; defaults to it */
364
391
  --gl-color-text /* Text color */
365
392
  --gl-color-text-muted /* Secondary text */
366
393
 
@@ -405,6 +432,14 @@ All visual values are controlled via CSS Custom Properties:
405
432
  --gl-list-title-white-space /* nowrap, or normal to wrap list titles */
406
433
  --gl-list-subtitle-white-space /* nowrap, or normal to wrap list subtitles */
407
434
  --gl-list-subtitle-lines /* clamp of __subtitle--wrap, 3; none = all */
435
+ --gl-blur-overlay /* blur behind dialogs; unset: --gl-blur-soft; kept by the surface presets */
436
+ --gl-toggle-track-bg /* toggle track when off; unset: --gl-surface-2 (…-checked: the primary gradient) */
437
+ --gl-radio-bg, --gl-radio-bg-checked, --gl-radio-border, --gl-radio-border-checked
438
+ --gl-radio-dot-size /* 10px */
439
+ --gl-radio-dot-color /* white */
440
+ --gl-textarea-field-sizing /* fixed; content lets text areas grow with their text */
441
+ --gl-input-picker-icon /* none hides Chromium's picker button of date and time fields */
442
+ --gl-tab-bar-active-color /* icon and label of the active tab; unset: --gl-color-primary-text */
408
443
  ```
409
444
 
410
445
  The full token reference can be found in the [Documentation](docs.html).
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: glasskit-css
3
- description: GlassKit is a pure CSS glassmorphism component library (v1.24.0) with 34 components, Dark & Light mode, design tokens, and BEM-like naming. Use this reference whenever generating HTML that uses GlassKit classes to ensure correct structure, nesting, modifiers, and token usage.
3
+ description: GlassKit is a pure CSS glassmorphism component library (v1.26.0) with 34 components, Dark & Light mode, design tokens, and BEM-like naming. Use this reference whenever generating HTML that uses GlassKit classes to ensure correct structure, nesting, modifiers, and token usage.
4
4
  ---
5
5
 
6
6
  # GlassKit CSS – AI Component Reference
@@ -104,6 +104,8 @@ Opaque surfaces without blur and gloss, for admin screens, forms on a plain back
104
104
 
105
105
  Each surface (`--gl-surface-*`, the milk surfaces, the card glow) takes the colour the glass shows over `--gl-color-bg-mid`, so the order of the surfaces stays and a re-branded background carries over. `--gl-blur*` are `0px`, the `--gl-inset-*` shine and the gloss tokens (`--gl-gloss-card`, `--gl-gloss-modal`, `--gl-gloss-progress`, `--gl-range-thumb-border`) are off. Borders, drop shadows, the tints of badges and chips and the overlay stay. A theme scope inside the page (an element with its own `data-theme`) stays solid. It is tokens only: tune it with `[data-surface='solid'] { --gl-surface-2: … }`, never by overriding a component's `background` or `backdrop-filter`. Without the attribute nothing changes; `removeAttribute('data-surface')` switches back at runtime. GlassKit Elements mirrors the attribute into its shadow roots.
106
106
 
107
+ **Tint (since 1.25.0).** For a page with a background of its own — a brand colour, a photo, a pattern — `data-surface="tint"`: the surfaces in the flow of the page become see-through tints of the text colour (`--gl-surface-1` … `-5` at 4, 6, 9, 12, 16 %, the card glow likewise), nothing blurred. What lies over other content — modal, sheet, popover, toast, the tab bars, with the fields and rows inside them — keeps the solid values, and so do the milk surfaces (the secondary button is a light plate for dark ink). The solid values are kept as `--gl-solid-surface-1` … `-5` and `--gl-solid-card-glow-*` and follow `--gl-color-bg-mid`: a brand sets `[data-surface='tint'] { --gl-color-bg-mid: … }`. Blur and gloss are off as with solid; both presets leave `--gl-blur-overlay` alone.
108
+
107
109
  ### Printing (since 1.21.1)
108
110
 
109
111
  Print dialogs leave out backgrounds by default. The parts that carry a state keep their colours on paper (`print-color-adjust: exact` inside `@media print`): checkbox box and tick, radio circle and dot, toggle track and thumb, progress fill, the current step, the chosen day of date strip and calendar, the slider thumb, the tone dots. Everything else prints economically. Nothing to set — do not add your own `print-color-adjust` to whole components: it also stops the browser from darkening light text for paper.
@@ -161,6 +163,7 @@ All are derived from the state color via `color-mix()`, so overriding
161
163
  | `--gl-color-success-on-surface` | Badge text on the success tint | lightened / darkened success |
162
164
  | `--gl-color-error-on-surface` | Badge text on the error tint | lightened / darkened error |
163
165
  | `--gl-color-warning-on-surface` | Badge text on the warning tint (since 1.18.0) | lightened (dark) / darkened (light) warning |
166
+ | `--gl-color-primary-text` | Text and line icons in the primary straight on the page or the glass: `.glass-prose` links, icon and label of the active tab, `.glass-modal__action--primary`, `.glass-list__item--accent`, `.glass-range-value`, the accordion trigger on hover and the chevron of an open item (since 1.26.0) | `var(--gl-color-primary)` in both themes |
164
167
  | `--gl-color-primary-surface` / `-border` | Badge fill / border | `color-mix(… primary 25% / 30%, transparent)` |
165
168
  | `--gl-color-success-surface` / `-border` | Badge fill / border | `color-mix(… success 15% / 30%, transparent)` |
166
169
  | `--gl-color-error-surface` / `-border` | Badge fill / border | `color-mix(… error 15% / 30%, transparent)` |
@@ -189,6 +192,15 @@ fully-translucent pre-1.7.0 chip.
189
192
  > surface.** Those values are fills. Use the matching `-on-surface` token, which is what
190
193
  > `.glass-badge--*` does.
191
194
 
195
+ > **Primary-coloured text on the page or the glass takes `--gl-color-primary-text`** (since 1.26.0), not `--gl-color-primary`. It defaults to the primary, so it looks the same, but a brand that darkens its primary for white button text can lighten the text in its dark theme without touching a button. Write the light rule after the dark one, because `:root` matches a page in the light theme too:
196
+ >
197
+ > ```css
198
+ > :root, [data-theme="dark"] { --gl-color-primary-text: color-mix(in srgb, var(--gl-color-primary) 18%, #ffffff); }
199
+ > [data-theme="light"] { --gl-color-primary-text: var(--gl-color-primary); }
200
+ > ```
201
+ >
202
+ > Measured on GlassKit's dark background with `#c25028` as primary: a link on a glass card goes from 1.37:1 to 5.05:1, the active tab of the floating bar from 2.24:1 to 8.28:1. The active tab also reads `--gl-tab-bar-active-color` (unset → `--gl-color-primary-text`), for icon and label alone.
203
+
192
204
  ### Glass Surfaces
193
205
 
194
206
  | Token | Dark | Usage |
@@ -431,7 +443,7 @@ Fixed bottom navigation with glass background. Requires `glass-bg--has-tab-bar`
431
443
  |---|---|
432
444
  | `.glass-tab-bar` | Container: fixed bottom, glass blur |
433
445
  | `.glass-tab-bar__item` | Individual tab |
434
- | `.glass-tab-bar__item.is-active` | Active tab (primary color) |
446
+ | `.glass-tab-bar__item.is-active` | Active tab: icon and label in `--gl-tab-bar-active-color` where set, else `--gl-color-primary-text` (since 1.26.0; both default to the primary); glow and dot in the primary |
435
447
  | `.glass-tab-bar__icon` | Icon wrapper |
436
448
  | `.glass-tab-bar__badge` | Numeric badge inside icon |
437
449
  | `.glass-tab-bar__label` | Text label below icon |
@@ -459,7 +471,7 @@ Pill-shaped, centered, floating bar (iOS 26 Liquid Glass style). Wrap it in `.gl
459
471
  |---|---|
460
472
  | `.glass-tab-bar-dock` | Wrapper: fixed bottom-center, holds bar + accessory |
461
473
  | `.glass-tab-bar-dock--accessory-left` | Modifier: accessory on the left |
462
- | `.glass-tab-bar--floating` | Pill shape, max-content width, spotlight active state |
474
+ | `.glass-tab-bar--floating` | Pill shape, max-content width, spotlight active state (`--gl-tab-bar-spotlight-color`, the primary) |
463
475
  | `.glass-tab-bar__accessory` | Standalone glass capsule next to the bar |
464
476
  | `.glass-tab-bar__accessory--accent` / `--success` / `--error` | Filled colored accessory (white icon) |
465
477
  | `.glass-bg--has-tab-bar-floating` | Background padding for the floating variant |
@@ -733,6 +745,8 @@ dialog.addEventListener('cancel', (e) => { e.preventDefault(); closeDialog(); })
733
745
 
734
746
  While a modal dialog is open everything outside it is inert — a toast shown then is neither clickable nor announced; give feedback inside the dialog. Wider dialogs (forms, tables): `.my-dialog { --gl-modal-max-width: 560px; }`.
735
747
 
748
+ **Blur behind the dialog (since 1.25.0).** The dimmer of `.glass-modal-overlay` and `.glass-sheet-overlay` blurs with `--gl-blur-overlay` where set, else with `--gl-blur-soft`. The surface presets set the blur tokens to 0 but not this one, so `:root { --gl-blur-overlay: 8px; }` keeps a blurred dimmer on a page without glass.
749
+
736
750
  ---
737
751
 
738
752
  ### 3.13 Toast
@@ -832,6 +846,8 @@ Date and time fields (`type="date"`, `time`, `datetime-local`, `month`) take the
832
846
  </div>
833
847
  ```
834
848
 
849
+ **Long values, empty labels, picker icon (since 1.25.0).** A value or placeholder too long for the field ends in an ellipsis while the field is not being edited, and a `.glass-label` without text takes no room (`:empty`; it used to keep the group's 8px gap). Date and time fields keep the browser's own picker button; `--gl-input-picker-icon: none` hides it in Chromium (WebKit and Firefox draw none to hide) — for a field whose prefix is the picker; call `showPicker()` from it then. It also hides the arrow of a field with a `<datalist>`.
850
+
835
851
  ---
836
852
 
837
853
  ### 3.15 Textarea
@@ -846,6 +862,8 @@ Multi-line text field.
846
862
  |---|---|
847
863
  | `.glass-textarea` | Multi-line glass input |
848
864
 
865
+ **Growing and read-only (since 1.25.0).** `--gl-textarea-field-sizing: content` lets text areas grow with their text, where `field-sizing` is supported; off by default (`fixed`), because it ignores `rows`. A read-only or disabled text area has no resize handle.
866
+
849
867
  ---
850
868
 
851
869
  ### 3.16 Select
@@ -917,6 +935,8 @@ iOS-style switch.
917
935
 
918
936
  The input is invisible but lies **on top of** the track and takes the click itself (since 1.20.0) — a test tool clicking the switch by role (`getByRole('switch')` with `role="switch"` on the input) reaches it. It covers only the track; label text, links in it included, stays the label's. An empty `__label` takes no room (no 12px gap). Both apply to checkbox and radio as well.
919
937
 
938
+ **Track tokens (since 1.25.0).** `--gl-toggle-track-bg` (off; unset `--gl-surface-2`) and `--gl-toggle-track-bg-checked` (on; unset the primary gradient) — a stronger track for a page without glass, e.g. `color-mix(in srgb, var(--gl-color-text) 35%, transparent)`.
939
+
920
940
  ---
921
941
 
922
942
  ### 3.19 Checkbox
@@ -979,6 +999,8 @@ Animated radio button with dot.
979
999
 
980
1000
  **Important:** Radio buttons in the same group need the same `name` attribute value.
981
1001
 
1002
+ **Radio tokens (since 1.25.0).** `--gl-radio-bg` / `--gl-radio-bg-checked` (unset `--gl-surface-2` / the primary gradient), `--gl-radio-border` / `--gl-radio-border-checked` (whole border values; unset `1.5px solid` in `--gl-border-medium` / `--gl-border-warm` — give both the same width), `--gl-radio-dot-size` (`10px`; `50%` follows the circle) and `--gl-radio-dot-color` (`white`). A ring that turns the accent colour: `--gl-radio-bg: transparent; --gl-radio-bg-checked: transparent; --gl-radio-border: 2px solid color-mix(in srgb, var(--gl-color-text) 60%, transparent); --gl-radio-border-checked: 2px solid var(--gl-color-primary); --gl-radio-dot-size: 50%; --gl-radio-dot-color: var(--gl-color-primary)`.
1003
+
982
1004
  ---
983
1005
 
984
1006
  ### 3.21 Range Slider
@@ -2141,6 +2163,19 @@ Two things worth knowing:
2141
2163
  }
2142
2164
  ```
2143
2165
 
2166
+ The opposite case — a primary dark enough for white button text, too dark for text on a dark background — is `--gl-color-primary-text` (since 1.26.0, section 2). It colours prose links, the active tab, the primary modal action, accent list rows, the range value and the accordion, and defaults to the primary. Set it per theme, the light rule after the dark one:
2167
+
2168
+ ```css
2169
+ :root, [data-theme="dark"] {
2170
+ --gl-color-primary-text: color-mix(in srgb, var(--gl-color-primary) 18%, #ffffff);
2171
+ --gl-tab-bar-active-color: #ffffff; /* optional: icon and label of the active tab alone */
2172
+ }
2173
+ [data-theme="light"] {
2174
+ --gl-color-primary-text: var(--gl-color-primary);
2175
+ --gl-tab-bar-active-color: var(--gl-color-primary-text);
2176
+ }
2177
+ ```
2178
+
2144
2179
  Overriding `--gl-color-success` / `--gl-color-error` is enough on its own: fill, border,
2145
2180
  text and glow of every state component are derived from those tokens. Only if you want
2146
2181
  a different ink than the derived one do you need to touch `--gl-color-{state}-on-surface`.