@lilydesignsystem/themes 0.6.0 → 0.6.1

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.
Files changed (66) hide show
  1. package/LICENSE.md +8 -8
  2. package/dist/abyss.css +629 -22
  3. package/dist/acid.css +628 -21
  4. package/dist/adobe-spectrum.css +630 -23
  5. package/dist/ant-design.css +628 -21
  6. package/dist/aqua.css +630 -23
  7. package/dist/atlassian.css +628 -21
  8. package/dist/australia-agriculture-design-system.css +4569 -0
  9. package/dist/autumn.css +630 -23
  10. package/dist/black.css +629 -22
  11. package/dist/brazil-padrao-digital-de-governo.css +4569 -0
  12. package/dist/bumblebee.css +631 -24
  13. package/dist/business.css +629 -22
  14. package/dist/canada-government-of-canada-design-system.css +4569 -0
  15. package/dist/cappuccino.css +628 -21
  16. package/dist/caramellatte.css +629 -22
  17. package/dist/cmyk.css +628 -21
  18. package/dist/coffee.css +628 -21
  19. package/dist/corporate.css +632 -25
  20. package/dist/cupcake.css +629 -22
  21. package/dist/cyberpunk.css +628 -21
  22. package/dist/dark.css +630 -23
  23. package/dist/dim.css +628 -21
  24. package/dist/dracula.css +628 -21
  25. package/dist/emerald.css +629 -22
  26. package/dist/european-union-europa-component-library.css +4569 -0
  27. package/dist/excel.css +628 -21
  28. package/dist/fantasy.css +629 -22
  29. package/dist/fluent.css +628 -21
  30. package/dist/forest.css +628 -21
  31. package/dist/garden.css +630 -23
  32. package/dist/github-primer.css +628 -21
  33. package/dist/halloween.css +629 -22
  34. package/dist/ibm-carbon.css +628 -21
  35. package/dist/japan-digital-agency-design-system.css +4569 -0
  36. package/dist/lemonade.css +628 -21
  37. package/dist/light.css +629 -22
  38. package/dist/linear.css +628 -21
  39. package/dist/lofi.css +628 -21
  40. package/dist/luxury.css +628 -21
  41. package/dist/mozilla-protocol.css +630 -23
  42. package/dist/night.css +628 -21
  43. package/dist/nord.css +628 -21
  44. package/dist/notion.css +628 -21
  45. package/dist/pastel.css +635 -28
  46. package/dist/retro.css +632 -25
  47. package/dist/salesforce.css +628 -21
  48. package/dist/sap-fiori.css +628 -21
  49. package/dist/silk.css +629 -22
  50. package/dist/singapore-government-design-system.css +4569 -0
  51. package/dist/sunset.css +628 -21
  52. package/dist/synthwave.css +628 -21
  53. package/dist/united-kingdom-government-digital-service.css +628 -21
  54. package/dist/united-kingdom-national-health-service-england-for-patients.css +652 -32
  55. package/dist/united-kingdom-national-health-service-england-for-practitioners.css +650 -30
  56. package/dist/united-kingdom-national-health-service-scotland-for-patients.css +663 -40
  57. package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +658 -35
  58. package/dist/united-kingdom-national-health-service-wales-for-patients.css +663 -38
  59. package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +656 -31
  60. package/dist/united-states-web-design-system.css +629 -22
  61. package/dist/valentine.css +632 -25
  62. package/dist/vercel.css +628 -21
  63. package/dist/winter.css +629 -22
  64. package/dist/wireframe.css +628 -21
  65. package/index.md +8 -4
  66. package/package.json +2 -2
@@ -41,8 +41,10 @@
41
41
  * ring; the practitioner UI just packs more information into the same
42
42
  * viewport.
43
43
  *
44
- * Upstream tracked: NHS.UK frontend v9.x visual language (v10 is in
45
- * pre-release; re-check the palette when it goes stable). Independent
44
+ * Upstream tracked: nhsuk-frontend 10.7.1 (npm, published 2026-10-29;
45
+ * re-baselined from 9.x on 2026-10-29 against the package's Sass
46
+ * settings and CHANGELOG; v10 has been stable since 10.0.0 on
47
+ * 2025-08-26). Independent
46
48
  * implementation against Lily class hooks; not affiliated with or
47
49
  * endorsed by the NHS.
48
50
  *
@@ -53,9 +55,13 @@
53
55
  * - NHS frontend tokens (Sass source):
54
56
  * https://github.com/nhsuk/nhsuk-frontend
55
57
  * - Typography: Frutiger W01 (primary), Arial / system-ui fallback
56
- * - Base font size: 16px, modular scale (14 / 16 / 19 / 22 / 26 / 32 / 48 / 64)
57
- * - Spacing scale (px): 0, 4, 8, 12, 16, 24, 32, 40, 48, 64
58
- * - WCAG 2.2 AAA target; focus outline is 4px solid #FFEB3B over #212B32
58
+ * - Base font size: 16px; nhsuk-frontend 10 type scale points (tablet px):
59
+ * 14 / 16 / 19 / 22 / 26 / 36 / 48 / 64 (point 24 was removed in 10.0.0)
60
+ * - nhsuk-frontend 10 spacing points (px): 0, 4, 8, 16, 24, 32, 40, 48, 56, 64
61
+ * (unchanged from 9.x)
62
+ * - WCAG 2.2 AAA target. Upstream focus style (unchanged in v10): #FFEB3B
63
+ * fill with a 4px #212B32 bar (`$nhsuk-focus-width`); this theme's own
64
+ * focus ring is `--lily-focus-ring` below
59
65
  *
60
66
  * Brand palette (sRGB → OKLCH conversions used below)
61
67
  * NHS Blue #005EB8 primary brand colour
@@ -70,7 +76,9 @@
70
76
  * NHS White #FFFFFF page background
71
77
  * NHS Warm Yellow #FFB81C warning / focus indicator
72
78
  * NHS Emergency Red #DA291C error / destructive action
73
- * NHS Green #009639 success / confirmation
79
+ * NHS.UK Green #007F3B success / confirmation (nhsuk-frontend 10
80
+ * `$nhsuk-success-colour`; was NHS Identity
81
+ * green #009639 until 2026-10-29)
74
82
  * NHS Dark Green #006747 success hover
75
83
  *
76
84
  * Geometry rules (NHS frontend defaults)
@@ -153,9 +161,12 @@
153
161
  /* ---- Success (NHS Green)
154
162
  -------------------------------------------- */ /*
155
163
  Confirmation, completed-step, "you have been booked"
156
- panels. */ /* NHS Green #009639 — meets 4.5:1 against white
157
- when paired below. */
158
- --color-success: oklch(56% 0.16 145);
164
+ panels. */ /* NHS.UK frontend green #007F3B, nhsuk-frontend
165
+ 10.7.1 `$nhsuk-success-colour` (core/settings/_colours-
166
+ applied.scss, new in v10). Re-baselined 2026-10-29 from NHS
167
+ Identity green #009639, which gave white content 4.37:1
168
+ (below AA); white content is now 5.19:1. */
169
+ --color-success: oklch(52% 0.14 151);
159
170
  --color-success-content: oklch(100% 0 0);
160
171
  /* ---- Warning (NHS Warm Yellow)
161
172
  -------------------------------------- */ /* Caution
@@ -192,17 +203,27 @@
192
203
  so checklist rows and field grids pack tightly. */
193
204
  --size-selector: 0.125rem;
194
205
  --size-field: 0.125rem;
195
- /* Border width: 1px hairline, matching `$nhsuk-border-width-
196
- form`. The hairline is the smallest legible border on the
197
- LCDs used in clinical settings; going to 0.5px loses the
198
- edge on non-Retina workstation displays still common in NHS
199
- estate. */
206
+ /* Border width: 1px hairline, Lily's own hairline, not an
207
+ upstream value: nhsuk-frontend 10 has no `$nhsuk-border-
208
+ width-form`; its form controls use `$nhsuk-border-width-
209
+ form-element` (2px). The hairline is the smallest legible
210
+ border on the LCDs used in clinical settings; going to
211
+ 0.5px loses the edge on non-Retina workstation displays
212
+ still common in NHS estate. */
200
213
  --border: 1px;
201
214
  /* Depth & noise off — NHS guidance avoids shadows and
202
215
  textures so */ /* the interface looks clinical, calm, and
203
216
  easy to read. */
204
217
  --depth: 0;
205
218
  --noise: 0;
219
+ /* Fluid inline gutter for page containers and the main
220
+ region: grows with the viewport from a 1rem floor to a 2rem
221
+ ceiling. Spacing only, never text. */
222
+ --space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
223
+ /* Fluid gap between sections (stacks and grids): grows with
224
+ the viewport from a 1rem floor to a 2rem ceiling. Spacing
225
+ only, never text. */
226
+ --space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
206
227
  }
207
228
 
208
229
  /* ----------------------------------------------------------------------------
@@ -304,7 +325,7 @@
304
325
  /* --- Typography ---------------------------------------------------- */
305
326
  /* Body font stack — system fonts first so consumers get a
306
327
  native-feeling baseline without shipping a web font. */
307
- --lily-font-body:
328
+ --lily-font-body-latin:
308
329
  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
309
330
  Arial, sans-serif;
310
331
  /* Monospaced font stack — used by code, kbd, identifiers, and
@@ -431,9 +452,12 @@
431
452
  }
432
453
 
433
454
  /* Invalid input — red border. The `aria-invalid="true"` attribute is the
434
- ARIA contract; pairing it with a colour change keeps WCAG 1.4.1
435
- (no colour-only meaning) honest because the ARIA state is also there. */
436
- :where([class$="-input"], .input)[aria-invalid="true"] {
455
+ ARIA contract (server-rendered errors); `:user-invalid` is the native
456
+ state that matches only after the user has interacted, so a required
457
+ field is not styled invalid on load. Pairing a colour change with the
458
+ ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
459
+ :where([class$="-input"], .input)[aria-invalid="true"],
460
+ :where([class$="-input"], .input):user-invalid {
437
461
  border-color: var(--color-error);
438
462
  }
439
463
 
@@ -1590,13 +1614,17 @@
1590
1614
  padding: 0.25rem 0.5rem;
1591
1615
  }
1592
1616
 
1593
- /* Sticky promo — sits at the very top of the viewport on scroll. */
1617
+ /* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
1618
+ the component's own bottom: 0 it would stretch over the whole page and take every click. */
1594
1619
  :where(.sticky-promo-banner) {
1595
1620
  position: sticky;
1596
- inset-block-start: 0;
1597
1621
  z-index: 10;
1598
1622
  }
1599
1623
 
1624
+ :where(.sticky-promo-banner:not([data-position="bottom"])) {
1625
+ inset-block-start: 0;
1626
+ }
1627
+
1600
1628
  /* Error message — inline form-validation message. */
1601
1629
  :where(.error-message) {
1602
1630
  color: var(--lily-error-text);
@@ -1775,7 +1803,8 @@
1775
1803
 
1776
1804
  /* --- Grail layout (5-region responsive page shell) --------------------- */
1777
1805
  /* Header spans the top; left-aside / main / right-aside fill the middle;
1778
- footer spans the bottom. At ≤768px the asides drop below the main. */
1806
+ footer spans the bottom. The collapse as the window narrows is in the shared
1807
+ container section at the end of this file. */
1779
1808
  :where(.grail-layout) {
1780
1809
  display: grid;
1781
1810
  min-height: 100vh;
@@ -1818,14 +1847,6 @@
1818
1847
  :where(.grail-layout-center-main) {
1819
1848
  padding: 0.75rem;
1820
1849
  }
1821
- /* Mobile breakpoint — collapse to a single column, stacking the regions. */
1822
- @media (max-width: 48rem) {
1823
- :where(.grail-layout) {
1824
- grid-template-areas: "header" "main" "left" "right" "footer";
1825
- grid-template-columns: 1fr;
1826
- grid-template-rows: auto auto auto auto auto;
1827
- }
1828
- }
1829
1850
 
1830
1851
  /* Standalone semantic header / footer landmarks. */
1831
1852
  :where(.header) {
@@ -1915,6 +1936,15 @@
1915
1936
  /* Drawers — side panels (right edge by default; RTL-aware via logical
1916
1937
  properties). Sit above the overlay container (z-index 101). */
1917
1938
  :where(.drawer, .slide-out-drawer, .sheet) {
1939
+ /* These are <dialog> elements opened with showModal() (P18-T6): undo the
1940
+ browser's centred-box defaults so the panel docks to the edge. */
1941
+ margin: 0;
1942
+ border: 0;
1943
+ inset-inline-start: auto;
1944
+ max-block-size: none;
1945
+ max-inline-size: none;
1946
+ block-size: 100%;
1947
+ box-sizing: border-box;
1918
1948
  position: fixed;
1919
1949
  inset-block: 0;
1920
1950
  inset-inline-end: 0;
@@ -1927,6 +1957,10 @@
1927
1957
  z-index: 101;
1928
1958
  }
1929
1959
 
1960
+ :where(.drawer, .slide-out-drawer, .sheet)::backdrop {
1961
+ background-color: color-mix(in oklch, black 50%, transparent);
1962
+ }
1963
+
1930
1964
  /* ==========================================================================
1931
1965
  * Menus
1932
1966
  * ====================================================================== */
@@ -1979,7 +2013,7 @@
1979
2013
  gap: 0.25rem;
1980
2014
  }
1981
2015
  /* Hamburger — bordered icon-button. */
1982
- :where(.hamburger-menu) {
2016
+ :where(.hamburger-menu > button) {
1983
2017
  display: inline-flex;
1984
2018
  align-items: center;
1985
2019
  justify-content: center;
@@ -2958,6 +2992,50 @@
2958
2992
  }
2959
2993
  }
2960
2994
 
2995
+ /* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
2996
+ browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
2997
+ where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
2998
+ open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
2999
+ hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
3000
+ `position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
3001
+ position-area: with no anchor, position-area does nothing and a static position can be off screen. */
3002
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
3003
+ display: none;
3004
+ }
3005
+
3006
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
3007
+ display: none;
3008
+ }
3009
+
3010
+ @supports (position-area: block-end) {
3011
+ :where(.cascader-trigger) { anchor-name: --lily-cascader; }
3012
+ :where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
3013
+ :where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
3014
+ :where(.combobox > input) { anchor-name: --lily-combobox; }
3015
+ :where(.cascader-panel) { position-anchor: --lily-cascader; }
3016
+ :where(.tree-select-panel) { position-anchor: --lily-tree-select; }
3017
+ :where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
3018
+ :where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
3019
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3020
+ position: fixed;
3021
+ inset: auto;
3022
+ margin: 0;
3023
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
3024
+ width: max-content;
3025
+ max-width: calc(100vw - 1rem);
3026
+ }
3027
+ :where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3028
+ inset-block-start: anchor(end, 25%);
3029
+ inset-inline-start: anchor(start, 25%);
3030
+ }
3031
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3032
+ position-area: block-end span-inline-end;
3033
+ }
3034
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3035
+ min-inline-size: anchor-size(inline);
3036
+ }
3037
+ }
3038
+
2961
3039
  :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
2962
3040
  > :where(
2963
3041
  .theme-picker-option,
@@ -3916,6 +3994,81 @@
3916
3994
  min-block-size: 24px;
3917
3995
  }
3918
3996
 
3997
+ /* ============================================================================
3998
+ * Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
3999
+ *
4000
+ * Where the primary pointer is coarse (a finger), interactive hooks are at least
4001
+ * 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
4002
+ * buttons, form fields, checkboxes and radios, and the link-shaped navigation
4003
+ * hooks. Links inside running text are exempt, so bare `a` is not listed. The
4004
+ * query is the capability, never a viewport width. :where() keeps specificity
4005
+ * at zero, so any consumer rule still wins.
4006
+ * ========================================================================= */
4007
+
4008
+ @media (pointer: coarse) {
4009
+ :where(button,
4010
+ [role="button"],
4011
+ [role="tab"],
4012
+ [role="option"],
4013
+ [role="menuitem"],
4014
+ [class*="-picker-button"],
4015
+ summary,
4016
+ input:not([type="hidden"]),
4017
+ select,
4018
+ textarea,
4019
+ .action-link,
4020
+ .back-link,
4021
+ .breadcrumb-list-item > a,
4022
+ .pagination-list-item > a,
4023
+ .contents-list-item > a,
4024
+ .section-list-item > a) {
4025
+ min-inline-size: 44px;
4026
+ min-block-size: 44px;
4027
+ }
4028
+ }
4029
+
4030
+ /* ============================================================================
4031
+ * Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
4032
+ *
4033
+ * --lily-brand is the identity's decorative colour: a header band, a rule, a
4034
+ * logo background. It is NEVER a text colour or a control's boundary, because a
4035
+ * brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
4036
+ * text drawn on it. By default they follow the theme's primary pair, which every
4037
+ * theme keeps readable; an adopter whose brand colour is lighter or darker sets
4038
+ * both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
4039
+ * content pairs (--color-base-content, --lily-error-text and so on).
4040
+ * ========================================================================== */
4041
+
4042
+ :where(:root) {
4043
+ --lily-brand: var(--color-primary);
4044
+ --lily-on-brand: var(--color-primary-content);
4045
+ }
4046
+
4047
+ /* ============================================================================
4048
+ * Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
4049
+ *
4050
+ * The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
4051
+ * adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
4052
+ * and no clear-space rule, because national and local guidelines disagree: a
4053
+ * theme or the adopter sets --lily-logo-clear-space (padding around the mark)
4054
+ * and --lily-logo-min-size (its smallest inline size). Both are unset by
4055
+ * default, so nothing changes until one is set.
4056
+ * ========================================================================== */
4057
+
4058
+ @layer lily {
4059
+ :where([data-lily-logo]) {
4060
+ display: inline-block;
4061
+ padding: var(--lily-logo-clear-space, 0);
4062
+ }
4063
+
4064
+ :where([data-lily-logo] > img, [data-lily-logo] > svg) {
4065
+ display: block;
4066
+ min-inline-size: var(--lily-logo-min-size, 0);
4067
+ max-inline-size: 100%;
4068
+ block-size: auto;
4069
+ }
4070
+ }
4071
+
3919
4072
  /* ============================================================================
3920
4073
  * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
3921
4074
  *
@@ -3944,6 +4097,140 @@
3944
4097
  overflow-wrap: anywhere;
3945
4098
  }
3946
4099
 
4100
+ /* ============================================================================
4101
+ * Scoped overflow — shared verbatim by all themes.
4102
+ *
4103
+ * Long unbroken strings (a national identifier, an email address, a URL) and
4104
+ * grid/flex tracks that refuse to shrink are the usual causes of horizontal
4105
+ * page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
4106
+ * `overflow-wrap: anywhere` on the places a long value lands (table cells are
4107
+ * covered by Overflow guards above), and `min-inline-size: 0` on the direct
4108
+ * children of Lily's grid and flex containers so a child can shrink below its
4109
+ * content. The identifier `-view` list below is the catalog's 70 national
4110
+ * identifier views (components-categories.tsv); bin/check-theme fails when it
4111
+ * drifts from the catalog. :where() keeps specificity at zero.
4112
+ * ========================================================================= */
4113
+
4114
+ :where(
4115
+ .alba-community-health-index-view,
4116
+ .australia-individual-healthcare-identifier-view,
4117
+ .belgique-numero-de-registre-national-view,
4118
+ .bulgaria-edinen-grazhdanski-nomer-view,
4119
+ .cesko-cestovni-pas-view,
4120
+ .cesko-rodne-cislo-view,
4121
+ .cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
4122
+ .kypros-national-passport-number-view,
4123
+ .danmark-personnummer-view,
4124
+ .deutschland-krankenversichertennummer-view,
4125
+ .eesti-isikukood-view,
4126
+ .ellada-dematerialised-securities-system-view,
4127
+ .england-national-health-service-number-view,
4128
+ .espana-codigo-de-identificacion-fiscal-view,
4129
+ .espana-tarjeta-sanitaria-individual-view,
4130
+ .france-numero-d-identification-au-repertoire-view,
4131
+ .hrvatska-osobni-identifikacijski-broj-view,
4132
+ .eire-individual-health-identifier-view,
4133
+ .island-kennitala-view,
4134
+ .italia-codice-fiscale-view,
4135
+ .latvija-personas-kods-view,
4136
+ .liechtenstein-national-identity-card-number-view,
4137
+ .liechtenstein-passport-number-view,
4138
+ .lietuva-asmens-kodas-view,
4139
+ .lietuva-pasas-view,
4140
+ .malta-national-identification-number-view,
4141
+ .malta-passport-number-view,
4142
+ .nederland-burgerservice-nummer-view,
4143
+ .nederland-identiteitskaart-nummer-view,
4144
+ .nederland-paspoort-nummer-view,
4145
+ .norge-fodselsnummer-view,
4146
+ .tuaisceart-eireann-health-and-care-number-view,
4147
+ .polska-numer-identyfikacji-podatkowej-view,
4148
+ .polska-pesel-view,
4149
+ .portugal-numero-de-identificacao-fiscal-view,
4150
+ .portugal-passaporte-view,
4151
+ .romania-cod-numeric-personal-view,
4152
+ .romania-pasaport-view,
4153
+ .slovenija-emso-view,
4154
+ .slovensko-pas-view,
4155
+ .slovensko-rodne-cislo-view,
4156
+ .suomi-henkilotunnus-view,
4157
+ .sverige-personnummer-view,
4158
+ .iban-view,
4159
+ .united-kingdom-national-health-service-number-view,
4160
+ .united-kingdom-national-insurance-number-view,
4161
+ .united-states-social-security-number-view,
4162
+ .aotearoa-national-health-index-view,
4163
+ .pilipinas-philhealth-identification-number-view,
4164
+ .brasil-cartao-nacional-de-saude-view,
4165
+ .schweiz-ahv-nummer-view,
4166
+ .canada-social-insurance-number-view,
4167
+ .hanguk-jumin-deungnok-beonho-view,
4168
+ .nihon-kojin-bango-view,
4169
+ .bharat-aadhaar-view,
4170
+ .yisrael-teudat-zehut-view,
4171
+ .south-africa-identity-number-view,
4172
+ .mexico-clave-unica-de-registro-de-poblacion-view,
4173
+ .singapore-national-registration-identity-card-view,
4174
+ .osterreich-sozialversicherungsnummer-view,
4175
+ .magyarorszag-taj-szam-view,
4176
+ .luxembourg-matricule-view,
4177
+ .zhongguo-jumin-shenfenzheng-haoma-view,
4178
+ .rossiya-snils-view,
4179
+ .turkiye-tc-kimlik-numarasi-view,
4180
+ .argentina-codigo-unico-de-identificacion-laboral-view,
4181
+ .ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
4182
+ .indonesia-nomor-induk-kependudukan-view,
4183
+ .prathet-thai-lek-prajam-tua-prachachon-view,
4184
+ .chile-rol-unico-nacional-view,
4185
+ .taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
4186
+ .hong-kong-identity-card-view,
4187
+ .iran-kod-e-melli-view,
4188
+ .as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
4189
+ .malaysia-kad-pengenalan-view,
4190
+ .viet-nam-can-cuoc-cong-dan-view,
4191
+ .pakistan-computerized-national-identity-card-view,
4192
+ .uruguay-cedula-de-identidad-view,
4193
+ .ecuador-cedula-de-identidad-view,
4194
+ .colombia-cedula-de-ciudadania-view,
4195
+ .australia-tax-file-number-view,
4196
+ .nigeria-national-identification-number-view,
4197
+ .misr-al-raqm-al-qawmi-view
4198
+ ) {
4199
+ overflow-wrap: anywhere;
4200
+ }
4201
+
4202
+ /* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
4203
+ :where(.summary-list, .summary-list-item, .description-list) {
4204
+ overflow-wrap: anywhere;
4205
+ }
4206
+
4207
+ :where(
4208
+ .grid,
4209
+ .flex-stack,
4210
+ .grail-layout,
4211
+ .summary-list,
4212
+ .summary-list-item,
4213
+ .description-list,
4214
+ .form,
4215
+ .editable-form,
4216
+ .field,
4217
+ .input-group,
4218
+ .button-group,
4219
+ .radio-group,
4220
+ .checkbox-group,
4221
+ .toggle-group,
4222
+ .tag-group,
4223
+ .split-view,
4224
+ .photo-pack,
4225
+ .data-filter-form,
4226
+ .action-bar,
4227
+ .tool-bar,
4228
+ .menu-bar,
4229
+ .tab-bar
4230
+ ) > :where(*) {
4231
+ min-inline-size: 0;
4232
+ }
4233
+
3947
4234
  /* ============================================================================
3948
4235
  * Helper packages — layout and look, shared verbatim by all themes.
3949
4236
  *
@@ -4071,6 +4358,8 @@
4071
4358
 
4072
4359
  :where(.gantt-table-td[data-in-range]) {
4073
4360
  background-color: var(--color-primary);
4361
+ /* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
4362
+ color: var(--color-primary-content);
4074
4363
  }
4075
4364
 
4076
4365
  :where(.gantt-table-td[data-in-range][data-milestone]) {
@@ -4093,3 +4382,334 @@
4093
4382
  :where(.time-zone-picker-option) {
4094
4383
  overflow-wrap: anywhere;
4095
4384
  }
4385
+
4386
+ /* ============================================================================
4387
+ * Overflow navigation — shared verbatim by all themes.
4388
+ *
4389
+ * The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
4390
+ * With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
4391
+ * (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
4392
+ * the links that do not fit into the More list. That list is in normal flow (position
4393
+ * static, never absolute), so opening it pushes the content below down and never covers it
4394
+ * (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
4395
+ * specificity at zero, so any consumer rule wins.
4396
+ * ========================================================================= */
4397
+
4398
+ :where(.navigation-menu-list) {
4399
+ display: flex;
4400
+ flex: 1 1 auto;
4401
+ flex-wrap: wrap;
4402
+ align-items: flex-start;
4403
+ gap: 0.25rem 0.5rem;
4404
+ min-inline-size: 0;
4405
+ margin: 0;
4406
+ padding: 0;
4407
+ list-style: none;
4408
+ }
4409
+
4410
+ :where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
4411
+ display: inline-block;
4412
+ min-inline-size: 24px;
4413
+ min-block-size: 24px;
4414
+ }
4415
+
4416
+ :where(.navigation-menu-more) {
4417
+ position: static;
4418
+ }
4419
+
4420
+ :where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
4421
+ display: none;
4422
+ }
4423
+
4424
+ :where(.navigation-menu-more-button) {
4425
+ min-inline-size: 24px;
4426
+ min-block-size: 24px;
4427
+ padding: 0.25rem 0.5rem;
4428
+ font: inherit;
4429
+ color: inherit;
4430
+ background: transparent;
4431
+ border: 1px solid currentcolor;
4432
+ cursor: pointer;
4433
+ }
4434
+
4435
+ :where(.navigation-menu-more-list) {
4436
+ position: static;
4437
+ margin: 0.25rem 0 0;
4438
+ padding: 0;
4439
+ list-style: none;
4440
+ }
4441
+
4442
+ /* ============================================================================
4443
+ * Container queries — shared verbatim by all themes.
4444
+ *
4445
+ * A component answers to the space it is given, not to the window: a summary
4446
+ * list in a narrow aside on a wide screen needs the narrow layout, which the
4447
+ * viewport query above cannot know. The three grail-layout regions are the
4448
+ * containers because their width comes from a grid track (`minmax(0, 1fr)`), so
4449
+ * inline-size containment cannot collapse them. `.card` is deliberately not a
4450
+ * container: in a shrink-to-fit parent (a flex row, an inline grid) containment
4451
+ * would collapse it to nothing. A component outside a grail region has no
4452
+ * container and keeps its wide layout. :where() keeps specificity at zero, so
4453
+ * any consumer rule wins.
4454
+ * ========================================================================= */
4455
+
4456
+ :where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
4457
+ container-type: inline-size;
4458
+ }
4459
+
4460
+ /* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
4461
+ window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
4462
+ Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
4463
+ (at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
4464
+ right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
4465
+ hidden, so all content stays reachable. */
4466
+ @media (max-width: 64rem) {
4467
+ :where(.grail-layout) {
4468
+ grid-template-areas:
4469
+ "header header"
4470
+ "left main"
4471
+ "right right"
4472
+ "footer footer";
4473
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
4474
+ grid-template-rows: auto auto auto auto;
4475
+ }
4476
+ }
4477
+
4478
+ @media (max-width: 48rem) {
4479
+ :where(.grail-layout) {
4480
+ grid-template-areas:
4481
+ "header"
4482
+ "left"
4483
+ "main"
4484
+ "right"
4485
+ "footer";
4486
+ grid-template-columns: minmax(0, 1fr);
4487
+ grid-template-rows: auto auto auto auto auto;
4488
+ }
4489
+ }
4490
+
4491
+ @container (max-width: 30rem) {
4492
+ :where(.summary-list) {
4493
+ grid-template-columns: minmax(0, 1fr);
4494
+ row-gap: 0.25rem;
4495
+ }
4496
+
4497
+ :where(.kanban-table-td) {
4498
+ min-width: 10rem;
4499
+ }
4500
+
4501
+ :where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
4502
+ padding-inline: 0.5rem;
4503
+ }
4504
+ }
4505
+
4506
+ /* ============================================================================
4507
+ * Focus not obscured — shared verbatim by all themes.
4508
+ *
4509
+ * WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
4510
+ * entirely hidden by author-created content, such as a bar fixed to the top or
4511
+ * bottom of the viewport. The browser scrolls a focused control into view, but
4512
+ * only as far as the edge of the viewport, which is where a fixed bar sits.
4513
+ * `scroll-padding` moves that edge in by the bar's height.
4514
+ *
4515
+ * Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
4516
+ * theme's or an app's own fixed header, a mobile bottom navigation) sets the
4517
+ * bar's height on the root element:
4518
+ *
4519
+ * --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
4520
+ * --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
4521
+ *
4522
+ * With both bars, set both. The defaults are 0px, so a page without a fixed bar
4523
+ * is unchanged. Specificity is zero (`:where`), so an app's own
4524
+ * `scroll-padding` wins.
4525
+ * ========================================================================= */
4526
+
4527
+ :where(html) {
4528
+ scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
4529
+ }
4530
+
4531
+ /* ============================================================================
4532
+ * Text size and motion preferences — shared verbatim by all themes.
4533
+ *
4534
+ * The text-size-picker sets `data-text-size` on the root and the motion-picker
4535
+ * sets `data-motion`; neither styles anything itself. These rules are what make
4536
+ * the choice visible.
4537
+ *
4538
+ * Text size: the seven steps scale the root font size, and every theme sizes in
4539
+ * `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
4540
+ * own browser setting), and the scale is percentages of that, never pixels, so
4541
+ * a viewer who raised their browser font size keeps it. The steps below
4542
+ * `normal` are the viewer's explicit choice.
4543
+ *
4544
+ * Motion: `data-motion="reduce"` shortens every animation and transition to
4545
+ * 0.01ms instead of removing it. The end state still arrives and `animationend`
4546
+ * / `transitionend` still fire, so nothing that depends on them breaks and no
4547
+ * information is lost: a spinner's `role="status"` text, a disclosure's open
4548
+ * state and a toast's content are untouched. Scrolling is instant.
4549
+ * ========================================================================= */
4550
+
4551
+ :where(html[data-text-size="smallest"]) { font-size: 80%; }
4552
+ :where(html[data-text-size="smaller"]) { font-size: 90%; }
4553
+ :where(html[data-text-size="small"]) { font-size: 95%; }
4554
+ :where(html[data-text-size="normal"]) { font-size: 100%; }
4555
+ :where(html[data-text-size="large"]) { font-size: 110%; }
4556
+ :where(html[data-text-size="larger"]) { font-size: 125%; }
4557
+ :where(html[data-text-size="largest"]) { font-size: 150%; }
4558
+
4559
+ :where(html[data-motion="reduce"]) {
4560
+ scroll-behavior: auto;
4561
+ }
4562
+ :where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
4563
+ animation-duration: 0.01ms !important;
4564
+ animation-iteration-count: 1 !important;
4565
+ animation-delay: 0s !important;
4566
+ transition-duration: 0.01ms !important;
4567
+ transition-delay: 0s !important;
4568
+ scroll-behavior: auto !important;
4569
+ }
4570
+
4571
+ /* ============================================================================
4572
+ * Forced colours and contrast preference — shared verbatim by all themes.
4573
+ *
4574
+ * Forced colours (Windows High Contrast, `forced-colors: active`): the browser
4575
+ * replaces every colour with a system colour, which erases anything a control
4576
+ * told apart by background alone. These rules give such controls a border,
4577
+ * keep the focus ring, and mark selected and current items with `Highlight`
4578
+ * and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
4579
+ *
4580
+ * Contrast preference (`prefers-contrast: more`): a heavier border on controls
4581
+ * and a thicker focus ring. Colours are not changed here; a theme's colours are
4582
+ * its author's decision.
4583
+ * ========================================================================= */
4584
+
4585
+ @media (forced-colors: active) {
4586
+ :where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
4587
+ border: 1px solid ButtonBorder;
4588
+ }
4589
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4590
+ outline: 3px solid Highlight;
4591
+ outline-offset: 2px;
4592
+ }
4593
+ :where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
4594
+ background: SelectedItem;
4595
+ color: SelectedItemText;
4596
+ forced-color-adjust: none;
4597
+ }
4598
+ :where([aria-current]:not([aria-current="false"])) {
4599
+ outline: 2px solid Highlight;
4600
+ outline-offset: -2px;
4601
+ }
4602
+ :where(:disabled, [aria-disabled="true"]) {
4603
+ border-color: GrayText;
4604
+ color: GrayText;
4605
+ }
4606
+ }
4607
+
4608
+ @media (prefers-contrast: more) {
4609
+ :where(button, input, select, textarea, [role="button"], [class$="-button"]) {
4610
+ border-width: 2px;
4611
+ border-style: solid;
4612
+ border-color: currentColor;
4613
+ }
4614
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4615
+ outline-width: 3px;
4616
+ outline-offset: 2px;
4617
+ }
4618
+ }
4619
+
4620
+ /* ============================================================================
4621
+ * Writing systems — shared verbatim by all themes.
4622
+ *
4623
+ * A theme names its Latin font stack (`--lily-font-body-latin`). This section
4624
+ * builds `--lily-font-body` from it, with the system fonts of the element's
4625
+ * script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
4626
+ * Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
4627
+ * scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
4628
+ * Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
4629
+ * Chinese and Japanese but drawn differently, so the language picks the font,
4630
+ * not the script.
4631
+ *
4632
+ * `--lily-font-body` is re-declared on every element with a `lang`, so a
4633
+ * `<p lang="ja">` inside an English page gets Japanese fonts and a
4634
+ * `<span lang="en">` inside it gets none. A language not listed here keeps the
4635
+ * Latin stack, whose final generic family the browser resolves per language.
4636
+ *
4637
+ * `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
4638
+ * and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
4639
+ * Elements with a `lang` use it; the app's body text should too.
4640
+ *
4641
+ * To change a theme's font, set `--lily-font-body-latin`; to change a script's,
4642
+ * set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
4643
+ * itself still works on the element you set it on.
4644
+ * ========================================================================= */
4645
+
4646
+ :where(:root, [lang]) {
4647
+ --lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
4648
+ --lily-line-height-body: 1.5;
4649
+ }
4650
+
4651
+ :where([lang]) {
4652
+ --lily-font-script: initial;
4653
+ line-height: var(--lily-line-height-body);
4654
+ }
4655
+
4656
+ :where([lang|="zh"], [lang|="wuu"]) {
4657
+ --lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
4658
+ }
4659
+ :where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
4660
+ --lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
4661
+ }
4662
+ :where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
4663
+ --lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
4664
+ }
4665
+ :where([lang|="ja"]) {
4666
+ --lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
4667
+ }
4668
+ :where([lang|="ko"]) {
4669
+ --lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
4670
+ }
4671
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
4672
+ --lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
4673
+ }
4674
+ :where([lang|="ur"]) {
4675
+ --lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
4676
+ }
4677
+ :where([lang|="he"], [lang|="yi"]) {
4678
+ --lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
4679
+ }
4680
+ :where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
4681
+ --lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
4682
+ }
4683
+ :where([lang|="bn"], [lang|="as"]) {
4684
+ --lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
4685
+ }
4686
+ :where([lang|="gu"]) {
4687
+ --lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
4688
+ }
4689
+ :where([lang|="pa"]) {
4690
+ --lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
4691
+ }
4692
+ :where([lang|="kn"]) {
4693
+ --lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
4694
+ }
4695
+ :where([lang|="ta"]) {
4696
+ --lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
4697
+ }
4698
+ :where([lang|="te"]) {
4699
+ --lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
4700
+ }
4701
+ :where([lang|="th"]) {
4702
+ --lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
4703
+ }
4704
+ :where([lang|="lo"]) {
4705
+ --lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
4706
+ }
4707
+ :where([lang|="km"]) {
4708
+ --lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
4709
+ }
4710
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
4711
+ [lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
4712
+ [lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
4713
+ [lang|="lo"], [lang|="km"]) {
4714
+ --lily-line-height-body: 1.75;
4715
+ }