@lilydesignsystem/themes 0.6.0 → 0.6.2

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 +635 -22
  3. package/dist/acid.css +634 -21
  4. package/dist/adobe-spectrum.css +636 -23
  5. package/dist/ant-design.css +634 -21
  6. package/dist/aqua.css +636 -23
  7. package/dist/atlassian.css +634 -21
  8. package/dist/australia-agriculture-design-system.css +4575 -0
  9. package/dist/autumn.css +636 -23
  10. package/dist/black.css +635 -22
  11. package/dist/brazil-padrao-digital-de-governo.css +4575 -0
  12. package/dist/bumblebee.css +637 -24
  13. package/dist/business.css +635 -22
  14. package/dist/canada-government-of-canada-design-system.css +4575 -0
  15. package/dist/cappuccino.css +634 -21
  16. package/dist/caramellatte.css +635 -22
  17. package/dist/cmyk.css +634 -21
  18. package/dist/coffee.css +634 -21
  19. package/dist/corporate.css +638 -25
  20. package/dist/cupcake.css +635 -22
  21. package/dist/cyberpunk.css +634 -21
  22. package/dist/dark.css +636 -23
  23. package/dist/dim.css +634 -21
  24. package/dist/dracula.css +634 -21
  25. package/dist/emerald.css +635 -22
  26. package/dist/european-union-europa-component-library.css +4575 -0
  27. package/dist/excel.css +634 -21
  28. package/dist/fantasy.css +635 -22
  29. package/dist/fluent.css +634 -21
  30. package/dist/forest.css +634 -21
  31. package/dist/garden.css +636 -23
  32. package/dist/github-primer.css +634 -21
  33. package/dist/halloween.css +635 -22
  34. package/dist/ibm-carbon.css +634 -21
  35. package/dist/japan-digital-agency-design-system.css +4575 -0
  36. package/dist/lemonade.css +634 -21
  37. package/dist/light.css +635 -22
  38. package/dist/linear.css +634 -21
  39. package/dist/lofi.css +634 -21
  40. package/dist/luxury.css +634 -21
  41. package/dist/mozilla-protocol.css +636 -23
  42. package/dist/night.css +634 -21
  43. package/dist/nord.css +634 -21
  44. package/dist/notion.css +634 -21
  45. package/dist/pastel.css +641 -28
  46. package/dist/retro.css +638 -25
  47. package/dist/salesforce.css +634 -21
  48. package/dist/sap-fiori.css +634 -21
  49. package/dist/silk.css +635 -22
  50. package/dist/singapore-government-design-system.css +4575 -0
  51. package/dist/sunset.css +634 -21
  52. package/dist/synthwave.css +634 -21
  53. package/dist/united-kingdom-government-digital-service.css +634 -21
  54. package/dist/united-kingdom-national-health-service-england-for-patients.css +658 -32
  55. package/dist/united-kingdom-national-health-service-england-for-practitioners.css +656 -30
  56. package/dist/united-kingdom-national-health-service-scotland-for-patients.css +669 -40
  57. package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +664 -35
  58. package/dist/united-kingdom-national-health-service-wales-for-patients.css +669 -38
  59. package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +662 -31
  60. package/dist/united-states-web-design-system.css +635 -22
  61. package/dist/valentine.css +638 -25
  62. package/dist/vercel.css +634 -21
  63. package/dist/winter.css +635 -22
  64. package/dist/wireframe.css +634 -21
  65. package/index.md +8 -4
  66. package/package.json +2 -2
@@ -56,8 +56,10 @@
56
56
  * more clinical reading of the same palette with magenta/violet
57
57
  * callouts reserved for safety messaging.
58
58
  *
59
- * Upstream tracked: NHS.UK frontend v9.x visual language (v10 is in
60
- * pre-release; re-check the palette when it goes stable). Independent
59
+ * Upstream tracked: nhsuk-frontend 10.7.1 (npm, published 2026-10-29;
60
+ * re-baselined from 9.x on 2026-10-29 against the package's Sass
61
+ * settings and CHANGELOG; v10 has been stable since 10.0.0 on
62
+ * 2025-08-26). Independent
61
63
  * implementation against Lily class hooks; not affiliated with or
62
64
  * endorsed by the NHS.
63
65
  *
@@ -75,10 +77,15 @@
75
77
  * https://www.gov.scot/publications/digital-scotland-service-standard/
76
78
  * - Typography: Frutiger W01 (primary, shared with NHS UK), Roboto for
77
79
  * NHS Inform body copy, Arial / system-ui as the universal fallback.
78
- * - Base font size: 16px; modular scale matches NHS UK (14/16/19/22/26/
79
- * 32/48/64) so components ported from the NHS UK frontend "just work".
80
- * - Spacing scale (px): 0, 4, 8, 12, 16, 24, 32, 40, 48, 64 — identical
81
- * to NHS UK frontend's `$nhsuk-spacing-responsive-scale`.
80
+ * - Base font size: 16px; type scale follows nhsuk-frontend 10 (tablet
81
+ * px 14/16/19/22/26/36/48/64; point 24 was removed in 10.0.0) so
82
+ * components ported from the NHS UK frontend "just work".
83
+ * - Spacing: nhsuk-frontend 10 spacing points (px) are 0, 4, 8, 16, 24,
84
+ * 32, 40, 48, 56, 64 (`$nhsuk-spacing-points`, unchanged from 9.x).
85
+ * - Scotland: no NHS Scotland or NHS Inform frontend package is
86
+ * published (npm search, 2026-10-29), so this theme takes
87
+ * nhsuk-frontend plus the Scottish palette below, which keeps its own
88
+ * values.
82
89
  * - WCAG 2.2 AA mandated by the Digital Scotland Service Standard;
83
90
  * Lily targets AAA. The focus indicator below clears AAA at 3:1
84
91
  * against every surface in the theme.
@@ -122,7 +129,10 @@
122
129
  * NHS Emergency Red #DA291C error / destructive action, also
123
130
  * the colour used on the "999" badge
124
131
  * inside NHS Inform.
125
- * NHS Green #009639 success / confirmation.
132
+ * NHS.UK Green #007F3B success / confirmation (nhsuk-frontend
133
+ * 10 `$nhsuk-success-colour`; was NHS
134
+ * Identity green #009639 until
135
+ * 2026-10-29).
126
136
  * NHS Dark Green #006747 success hover / pressed state.
127
137
  *
128
138
  * Geometry rules (shared with NHS UK frontend)
@@ -236,13 +246,17 @@
236
246
  --color-info: oklch(54% 0.17 247);
237
247
  --color-info-content: oklch(100% 0 0);
238
248
  /* ---- Success (NHS Green)
239
- -------------------------------------------- */ /* NHS
240
- Green #009639 — confirmation panels, completed-step
241
- indicators */ /* ("you have been booked"), and the success
242
- state on form summaries. */ /* Identical role and contrast
243
- target as the NHS UK system so shared */ /* components
244
- carry the same meaning across the border. */
245
- --color-success: oklch(56% 0.16 145);
249
+ -------------------------------------------- */ /* NHS.UK
250
+ frontend green #007F3B — confirmation panels, completed-
251
+ step indicators */ /* ("you have been booked"), and the
252
+ success state on form summaries. */ /* Identical role and
253
+ contrast target as the NHS UK system so shared */ /*
254
+ components carry the same meaning across the border. Re-
255
+ baselined 2026-10-29 to nhsuk-frontend 10.7.1 `$nhsuk-
256
+ success-colour` (core/settings/_colours-applied.scss, new
257
+ in v10); it was NHS Identity green #009639, which gave
258
+ white content 4.37:1 (below AA). Now 5.19:1. */
259
+ --color-success: oklch(52% 0.14 151);
246
260
  --color-success-content: oklch(100% 0 0);
247
261
  /* ---- Warning (NHS Warm Yellow)
248
262
  -------------------------------------- */ /* NHS Warm
@@ -286,11 +300,13 @@
286
300
  so */ /* checklist rows and field grids pack tightly. */
287
301
  --size-selector: 0.125rem;
288
302
  --size-field: 0.125rem;
289
- /* Border width: 1px hairline, matching `$nhsuk-border-width-
290
- form`. */ /* The hairline is the smallest legible border on
291
- the LCDs used in */ /* clinical settings; going to 0.5px
292
- loses the edge on non-Retina */ /* workstation displays
293
- still common in NHS estate. */
303
+ /* Border width: 1px hairline, Lily's own hairline, not an
304
+ upstream value: nhsuk-frontend 10 has no `$nhsuk-border-
305
+ width-form`; its form controls use `$nhsuk-border-width-
306
+ form-element` (2px). */ /* The hairline is the smallest
307
+ legible border on the LCDs used in */ /* clinical settings;
308
+ going to 0.5px loses the edge on non-Retina */ /*
309
+ workstation displays still common in NHS estate. */
294
310
  --border: 1px;
295
311
  /* Depth & noise off — NHS Scotland identity guidance, like
296
312
  NHS UK, */ /* avoids shadows, gradients, and textures so
@@ -299,6 +315,14 @@
299
315
  settings. */
300
316
  --depth: 0;
301
317
  --noise: 0;
318
+ /* Fluid inline gutter for page containers and the main
319
+ region: grows with the viewport from a 1rem floor to a 2rem
320
+ ceiling. Spacing only, never text. */
321
+ --space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
322
+ /* Fluid gap between sections (stacks and grids): grows with
323
+ the viewport from a 1rem floor to a 2rem ceiling. Spacing
324
+ only, never text. */
325
+ --space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
302
326
  }
303
327
 
304
328
  /* ----------------------------------------------------------------------------
@@ -400,7 +424,7 @@
400
424
  /* --- Typography ---------------------------------------------------- */
401
425
  /* Body font stack — system fonts first so consumers get a
402
426
  native-feeling baseline without shipping a web font. */
403
- --lily-font-body:
427
+ --lily-font-body-latin:
404
428
  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
405
429
  Arial, sans-serif;
406
430
  /* Monospaced font stack — used by code, kbd, identifiers, and
@@ -527,9 +551,12 @@
527
551
  }
528
552
 
529
553
  /* Invalid input — red border. The `aria-invalid="true"` attribute is the
530
- ARIA contract; pairing it with a colour change keeps WCAG 1.4.1
531
- (no colour-only meaning) honest because the ARIA state is also there. */
532
- :where([class$="-input"], .input)[aria-invalid="true"] {
554
+ ARIA contract (server-rendered errors); `:user-invalid` is the native
555
+ state that matches only after the user has interacted, so a required
556
+ field is not styled invalid on load. Pairing a colour change with the
557
+ ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
558
+ :where([class$="-input"], .input)[aria-invalid="true"],
559
+ :where([class$="-input"], .input):user-invalid {
533
560
  border-color: var(--color-error);
534
561
  }
535
562
 
@@ -1686,13 +1713,17 @@
1686
1713
  padding: 0.25rem 0.5rem;
1687
1714
  }
1688
1715
 
1689
- /* Sticky promo — sits at the very top of the viewport on scroll. */
1716
+ /* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
1717
+ the component's own bottom: 0 it would stretch over the whole page and take every click. */
1690
1718
  :where(.sticky-promo-banner) {
1691
1719
  position: sticky;
1692
- inset-block-start: 0;
1693
1720
  z-index: 10;
1694
1721
  }
1695
1722
 
1723
+ :where(.sticky-promo-banner:not([data-position="bottom"])) {
1724
+ inset-block-start: 0;
1725
+ }
1726
+
1696
1727
  /* Error message — inline form-validation message. */
1697
1728
  :where(.error-message) {
1698
1729
  color: var(--lily-error-text);
@@ -1871,7 +1902,8 @@
1871
1902
 
1872
1903
  /* --- Grail layout (5-region responsive page shell) --------------------- */
1873
1904
  /* Header spans the top; left-aside / main / right-aside fill the middle;
1874
- footer spans the bottom. At ≤768px the asides drop below the main. */
1905
+ footer spans the bottom. The collapse as the window narrows is in the shared
1906
+ container section at the end of this file. */
1875
1907
  :where(.grail-layout) {
1876
1908
  display: grid;
1877
1909
  min-height: 100vh;
@@ -1914,14 +1946,6 @@
1914
1946
  :where(.grail-layout-center-main) {
1915
1947
  padding: 0.75rem;
1916
1948
  }
1917
- /* Mobile breakpoint — collapse to a single column, stacking the regions. */
1918
- @media (max-width: 48rem) {
1919
- :where(.grail-layout) {
1920
- grid-template-areas: "header" "main" "left" "right" "footer";
1921
- grid-template-columns: 1fr;
1922
- grid-template-rows: auto auto auto auto auto;
1923
- }
1924
- }
1925
1949
 
1926
1950
  /* Standalone semantic header / footer landmarks. */
1927
1951
  :where(.header) {
@@ -2011,6 +2035,15 @@
2011
2035
  /* Drawers — side panels (right edge by default; RTL-aware via logical
2012
2036
  properties). Sit above the overlay container (z-index 101). */
2013
2037
  :where(.drawer, .slide-out-drawer, .sheet) {
2038
+ /* These are <dialog> elements opened with showModal() (P18-T6): undo the
2039
+ browser's centred-box defaults so the panel docks to the edge. */
2040
+ margin: 0;
2041
+ border: 0;
2042
+ inset-inline-start: auto;
2043
+ max-block-size: none;
2044
+ max-inline-size: none;
2045
+ block-size: 100%;
2046
+ box-sizing: border-box;
2014
2047
  position: fixed;
2015
2048
  inset-block: 0;
2016
2049
  inset-inline-end: 0;
@@ -2023,6 +2056,10 @@
2023
2056
  z-index: 101;
2024
2057
  }
2025
2058
 
2059
+ :where(.drawer, .slide-out-drawer, .sheet)::backdrop {
2060
+ background-color: color-mix(in oklch, black 50%, transparent);
2061
+ }
2062
+
2026
2063
  /* ==========================================================================
2027
2064
  * Menus
2028
2065
  * ====================================================================== */
@@ -2075,7 +2112,7 @@
2075
2112
  gap: 0.25rem;
2076
2113
  }
2077
2114
  /* Hamburger — bordered icon-button. */
2078
- :where(.hamburger-menu) {
2115
+ :where(.hamburger-menu > button) {
2079
2116
  display: inline-flex;
2080
2117
  align-items: center;
2081
2118
  justify-content: center;
@@ -3054,6 +3091,56 @@
3054
3091
  }
3055
3092
  }
3056
3093
 
3094
+ /* A closed popover stays closed. Author `display` beats the browser's own rule for a closed popover, so the
3095
+ menu rule above would otherwise leave every closed dropdown-menu and context-menu on the page. */
3096
+ :where([popover]:not(:popover-open)) {
3097
+ display: none;
3098
+ }
3099
+
3100
+ /* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
3101
+ browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
3102
+ where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
3103
+ open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
3104
+ hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
3105
+ `position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
3106
+ position-area: with no anchor, position-area does nothing and a static position can be off screen. */
3107
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
3108
+ display: none;
3109
+ }
3110
+
3111
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
3112
+ display: none;
3113
+ }
3114
+
3115
+ @supports (position-area: block-end) {
3116
+ :where(.cascader-trigger) { anchor-name: --lily-cascader; }
3117
+ :where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
3118
+ :where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
3119
+ :where(.combobox > input) { anchor-name: --lily-combobox; }
3120
+ :where(.cascader-panel) { position-anchor: --lily-cascader; }
3121
+ :where(.tree-select-panel) { position-anchor: --lily-tree-select; }
3122
+ :where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
3123
+ :where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
3124
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3125
+ position: fixed;
3126
+ inset: auto;
3127
+ margin: 0;
3128
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
3129
+ width: max-content;
3130
+ max-width: calc(100vw - 1rem);
3131
+ }
3132
+ :where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3133
+ inset-block-start: anchor(end, 25%);
3134
+ inset-inline-start: anchor(start, 25%);
3135
+ }
3136
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3137
+ position-area: block-end span-inline-end;
3138
+ }
3139
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3140
+ min-inline-size: anchor-size(inline);
3141
+ }
3142
+ }
3143
+
3057
3144
  :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
3058
3145
  > :where(
3059
3146
  .theme-picker-option,
@@ -4012,6 +4099,81 @@
4012
4099
  min-block-size: 24px;
4013
4100
  }
4014
4101
 
4102
+ /* ============================================================================
4103
+ * Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
4104
+ *
4105
+ * Where the primary pointer is coarse (a finger), interactive hooks are at least
4106
+ * 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
4107
+ * buttons, form fields, checkboxes and radios, and the link-shaped navigation
4108
+ * hooks. Links inside running text are exempt, so bare `a` is not listed. The
4109
+ * query is the capability, never a viewport width. :where() keeps specificity
4110
+ * at zero, so any consumer rule still wins.
4111
+ * ========================================================================= */
4112
+
4113
+ @media (pointer: coarse) {
4114
+ :where(button,
4115
+ [role="button"],
4116
+ [role="tab"],
4117
+ [role="option"],
4118
+ [role="menuitem"],
4119
+ [class*="-picker-button"],
4120
+ summary,
4121
+ input:not([type="hidden"]),
4122
+ select,
4123
+ textarea,
4124
+ .action-link,
4125
+ .back-link,
4126
+ .breadcrumb-list-item > a,
4127
+ .pagination-list-item > a,
4128
+ .contents-list-item > a,
4129
+ .section-list-item > a) {
4130
+ min-inline-size: 44px;
4131
+ min-block-size: 44px;
4132
+ }
4133
+ }
4134
+
4135
+ /* ============================================================================
4136
+ * Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
4137
+ *
4138
+ * --lily-brand is the identity's decorative colour: a header band, a rule, a
4139
+ * logo background. It is NEVER a text colour or a control's boundary, because a
4140
+ * brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
4141
+ * text drawn on it. By default they follow the theme's primary pair, which every
4142
+ * theme keeps readable; an adopter whose brand colour is lighter or darker sets
4143
+ * both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
4144
+ * content pairs (--color-base-content, --lily-error-text and so on).
4145
+ * ========================================================================== */
4146
+
4147
+ :where(:root) {
4148
+ --lily-brand: var(--color-primary);
4149
+ --lily-on-brand: var(--color-primary-content);
4150
+ }
4151
+
4152
+ /* ============================================================================
4153
+ * Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
4154
+ *
4155
+ * The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
4156
+ * adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
4157
+ * and no clear-space rule, because national and local guidelines disagree: a
4158
+ * theme or the adopter sets --lily-logo-clear-space (padding around the mark)
4159
+ * and --lily-logo-min-size (its smallest inline size). Both are unset by
4160
+ * default, so nothing changes until one is set.
4161
+ * ========================================================================== */
4162
+
4163
+ @layer lily {
4164
+ :where([data-lily-logo]) {
4165
+ display: inline-block;
4166
+ padding: var(--lily-logo-clear-space, 0);
4167
+ }
4168
+
4169
+ :where([data-lily-logo] > img, [data-lily-logo] > svg) {
4170
+ display: block;
4171
+ min-inline-size: var(--lily-logo-min-size, 0);
4172
+ max-inline-size: 100%;
4173
+ block-size: auto;
4174
+ }
4175
+ }
4176
+
4015
4177
  /* ============================================================================
4016
4178
  * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
4017
4179
  *
@@ -4040,6 +4202,140 @@
4040
4202
  overflow-wrap: anywhere;
4041
4203
  }
4042
4204
 
4205
+ /* ============================================================================
4206
+ * Scoped overflow — shared verbatim by all themes.
4207
+ *
4208
+ * Long unbroken strings (a national identifier, an email address, a URL) and
4209
+ * grid/flex tracks that refuse to shrink are the usual causes of horizontal
4210
+ * page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
4211
+ * `overflow-wrap: anywhere` on the places a long value lands (table cells are
4212
+ * covered by Overflow guards above), and `min-inline-size: 0` on the direct
4213
+ * children of Lily's grid and flex containers so a child can shrink below its
4214
+ * content. The identifier `-view` list below is the catalog's 70 national
4215
+ * identifier views (components-categories.tsv); bin/check-theme fails when it
4216
+ * drifts from the catalog. :where() keeps specificity at zero.
4217
+ * ========================================================================= */
4218
+
4219
+ :where(
4220
+ .alba-community-health-index-view,
4221
+ .australia-individual-healthcare-identifier-view,
4222
+ .belgique-numero-de-registre-national-view,
4223
+ .bulgaria-edinen-grazhdanski-nomer-view,
4224
+ .cesko-cestovni-pas-view,
4225
+ .cesko-rodne-cislo-view,
4226
+ .cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
4227
+ .kypros-national-passport-number-view,
4228
+ .danmark-personnummer-view,
4229
+ .deutschland-krankenversichertennummer-view,
4230
+ .eesti-isikukood-view,
4231
+ .ellada-dematerialised-securities-system-view,
4232
+ .england-national-health-service-number-view,
4233
+ .espana-codigo-de-identificacion-fiscal-view,
4234
+ .espana-tarjeta-sanitaria-individual-view,
4235
+ .france-numero-d-identification-au-repertoire-view,
4236
+ .hrvatska-osobni-identifikacijski-broj-view,
4237
+ .eire-individual-health-identifier-view,
4238
+ .island-kennitala-view,
4239
+ .italia-codice-fiscale-view,
4240
+ .latvija-personas-kods-view,
4241
+ .liechtenstein-national-identity-card-number-view,
4242
+ .liechtenstein-passport-number-view,
4243
+ .lietuva-asmens-kodas-view,
4244
+ .lietuva-pasas-view,
4245
+ .malta-national-identification-number-view,
4246
+ .malta-passport-number-view,
4247
+ .nederland-burgerservice-nummer-view,
4248
+ .nederland-identiteitskaart-nummer-view,
4249
+ .nederland-paspoort-nummer-view,
4250
+ .norge-fodselsnummer-view,
4251
+ .tuaisceart-eireann-health-and-care-number-view,
4252
+ .polska-numer-identyfikacji-podatkowej-view,
4253
+ .polska-pesel-view,
4254
+ .portugal-numero-de-identificacao-fiscal-view,
4255
+ .portugal-passaporte-view,
4256
+ .romania-cod-numeric-personal-view,
4257
+ .romania-pasaport-view,
4258
+ .slovenija-emso-view,
4259
+ .slovensko-pas-view,
4260
+ .slovensko-rodne-cislo-view,
4261
+ .suomi-henkilotunnus-view,
4262
+ .sverige-personnummer-view,
4263
+ .iban-view,
4264
+ .united-kingdom-national-health-service-number-view,
4265
+ .united-kingdom-national-insurance-number-view,
4266
+ .united-states-social-security-number-view,
4267
+ .aotearoa-national-health-index-view,
4268
+ .pilipinas-philhealth-identification-number-view,
4269
+ .brasil-cartao-nacional-de-saude-view,
4270
+ .schweiz-ahv-nummer-view,
4271
+ .canada-social-insurance-number-view,
4272
+ .hanguk-jumin-deungnok-beonho-view,
4273
+ .nihon-kojin-bango-view,
4274
+ .bharat-aadhaar-view,
4275
+ .yisrael-teudat-zehut-view,
4276
+ .south-africa-identity-number-view,
4277
+ .mexico-clave-unica-de-registro-de-poblacion-view,
4278
+ .singapore-national-registration-identity-card-view,
4279
+ .osterreich-sozialversicherungsnummer-view,
4280
+ .magyarorszag-taj-szam-view,
4281
+ .luxembourg-matricule-view,
4282
+ .zhongguo-jumin-shenfenzheng-haoma-view,
4283
+ .rossiya-snils-view,
4284
+ .turkiye-tc-kimlik-numarasi-view,
4285
+ .argentina-codigo-unico-de-identificacion-laboral-view,
4286
+ .ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
4287
+ .indonesia-nomor-induk-kependudukan-view,
4288
+ .prathet-thai-lek-prajam-tua-prachachon-view,
4289
+ .chile-rol-unico-nacional-view,
4290
+ .taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
4291
+ .hong-kong-identity-card-view,
4292
+ .iran-kod-e-melli-view,
4293
+ .as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
4294
+ .malaysia-kad-pengenalan-view,
4295
+ .viet-nam-can-cuoc-cong-dan-view,
4296
+ .pakistan-computerized-national-identity-card-view,
4297
+ .uruguay-cedula-de-identidad-view,
4298
+ .ecuador-cedula-de-identidad-view,
4299
+ .colombia-cedula-de-ciudadania-view,
4300
+ .australia-tax-file-number-view,
4301
+ .nigeria-national-identification-number-view,
4302
+ .misr-al-raqm-al-qawmi-view
4303
+ ) {
4304
+ overflow-wrap: anywhere;
4305
+ }
4306
+
4307
+ /* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
4308
+ :where(.summary-list, .summary-list-item, .description-list) {
4309
+ overflow-wrap: anywhere;
4310
+ }
4311
+
4312
+ :where(
4313
+ .grid,
4314
+ .flex-stack,
4315
+ .grail-layout,
4316
+ .summary-list,
4317
+ .summary-list-item,
4318
+ .description-list,
4319
+ .form,
4320
+ .editable-form,
4321
+ .field,
4322
+ .input-group,
4323
+ .button-group,
4324
+ .radio-group,
4325
+ .checkbox-group,
4326
+ .toggle-group,
4327
+ .tag-group,
4328
+ .split-view,
4329
+ .photo-pack,
4330
+ .data-filter-form,
4331
+ .action-bar,
4332
+ .tool-bar,
4333
+ .menu-bar,
4334
+ .tab-bar
4335
+ ) > :where(*) {
4336
+ min-inline-size: 0;
4337
+ }
4338
+
4043
4339
  /* ============================================================================
4044
4340
  * Helper packages — layout and look, shared verbatim by all themes.
4045
4341
  *
@@ -4167,6 +4463,8 @@
4167
4463
 
4168
4464
  :where(.gantt-table-td[data-in-range]) {
4169
4465
  background-color: var(--color-primary);
4466
+ /* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
4467
+ color: var(--color-primary-content);
4170
4468
  }
4171
4469
 
4172
4470
  :where(.gantt-table-td[data-in-range][data-milestone]) {
@@ -4189,3 +4487,334 @@
4189
4487
  :where(.time-zone-picker-option) {
4190
4488
  overflow-wrap: anywhere;
4191
4489
  }
4490
+
4491
+ /* ============================================================================
4492
+ * Overflow navigation — shared verbatim by all themes.
4493
+ *
4494
+ * The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
4495
+ * With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
4496
+ * (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
4497
+ * the links that do not fit into the More list. That list is in normal flow (position
4498
+ * static, never absolute), so opening it pushes the content below down and never covers it
4499
+ * (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
4500
+ * specificity at zero, so any consumer rule wins.
4501
+ * ========================================================================= */
4502
+
4503
+ :where(.navigation-menu-list) {
4504
+ display: flex;
4505
+ flex: 1 1 auto;
4506
+ flex-wrap: wrap;
4507
+ align-items: flex-start;
4508
+ gap: 0.25rem 0.5rem;
4509
+ min-inline-size: 0;
4510
+ margin: 0;
4511
+ padding: 0;
4512
+ list-style: none;
4513
+ }
4514
+
4515
+ :where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
4516
+ display: inline-block;
4517
+ min-inline-size: 24px;
4518
+ min-block-size: 24px;
4519
+ }
4520
+
4521
+ :where(.navigation-menu-more) {
4522
+ position: static;
4523
+ }
4524
+
4525
+ :where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
4526
+ display: none;
4527
+ }
4528
+
4529
+ :where(.navigation-menu-more-button) {
4530
+ min-inline-size: 24px;
4531
+ min-block-size: 24px;
4532
+ padding: 0.25rem 0.5rem;
4533
+ font: inherit;
4534
+ color: inherit;
4535
+ background: transparent;
4536
+ border: 1px solid currentcolor;
4537
+ cursor: pointer;
4538
+ }
4539
+
4540
+ :where(.navigation-menu-more-list) {
4541
+ position: static;
4542
+ margin: 0.25rem 0 0;
4543
+ padding: 0;
4544
+ list-style: none;
4545
+ }
4546
+
4547
+ /* ============================================================================
4548
+ * Container queries — shared verbatim by all themes.
4549
+ *
4550
+ * A component answers to the space it is given, not to the window: a summary
4551
+ * list in a narrow aside on a wide screen needs the narrow layout, which the
4552
+ * viewport query above cannot know. The three grail-layout regions are the
4553
+ * containers because their width comes from a grid track (`minmax(0, 1fr)`), so
4554
+ * inline-size containment cannot collapse them. `.card` is deliberately not a
4555
+ * container: in a shrink-to-fit parent (a flex row, an inline grid) containment
4556
+ * would collapse it to nothing. A component outside a grail region has no
4557
+ * container and keeps its wide layout. :where() keeps specificity at zero, so
4558
+ * any consumer rule wins.
4559
+ * ========================================================================= */
4560
+
4561
+ :where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
4562
+ container-type: inline-size;
4563
+ }
4564
+
4565
+ /* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
4566
+ window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
4567
+ Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
4568
+ (at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
4569
+ right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
4570
+ hidden, so all content stays reachable. */
4571
+ @media (max-width: 64rem) {
4572
+ :where(.grail-layout) {
4573
+ grid-template-areas:
4574
+ "header header"
4575
+ "left main"
4576
+ "right right"
4577
+ "footer footer";
4578
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
4579
+ grid-template-rows: auto auto auto auto;
4580
+ }
4581
+ }
4582
+
4583
+ @media (max-width: 48rem) {
4584
+ :where(.grail-layout) {
4585
+ grid-template-areas:
4586
+ "header"
4587
+ "left"
4588
+ "main"
4589
+ "right"
4590
+ "footer";
4591
+ grid-template-columns: minmax(0, 1fr);
4592
+ grid-template-rows: auto auto auto auto auto;
4593
+ }
4594
+ }
4595
+
4596
+ @container (max-width: 30rem) {
4597
+ :where(.summary-list) {
4598
+ grid-template-columns: minmax(0, 1fr);
4599
+ row-gap: 0.25rem;
4600
+ }
4601
+
4602
+ :where(.kanban-table-td) {
4603
+ min-width: 10rem;
4604
+ }
4605
+
4606
+ :where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
4607
+ padding-inline: 0.5rem;
4608
+ }
4609
+ }
4610
+
4611
+ /* ============================================================================
4612
+ * Focus not obscured — shared verbatim by all themes.
4613
+ *
4614
+ * WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
4615
+ * entirely hidden by author-created content, such as a bar fixed to the top or
4616
+ * bottom of the viewport. The browser scrolls a focused control into view, but
4617
+ * only as far as the edge of the viewport, which is where a fixed bar sits.
4618
+ * `scroll-padding` moves that edge in by the bar's height.
4619
+ *
4620
+ * Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
4621
+ * theme's or an app's own fixed header, a mobile bottom navigation) sets the
4622
+ * bar's height on the root element:
4623
+ *
4624
+ * --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
4625
+ * --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
4626
+ *
4627
+ * With both bars, set both. The defaults are 0px, so a page without a fixed bar
4628
+ * is unchanged. Specificity is zero (`:where`), so an app's own
4629
+ * `scroll-padding` wins.
4630
+ * ========================================================================= */
4631
+
4632
+ :where(html) {
4633
+ scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
4634
+ }
4635
+
4636
+ /* ============================================================================
4637
+ * Text size and motion preferences — shared verbatim by all themes.
4638
+ *
4639
+ * The text-size-picker sets `data-text-size` on the root and the motion-picker
4640
+ * sets `data-motion`; neither styles anything itself. These rules are what make
4641
+ * the choice visible.
4642
+ *
4643
+ * Text size: the seven steps scale the root font size, and every theme sizes in
4644
+ * `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
4645
+ * own browser setting), and the scale is percentages of that, never pixels, so
4646
+ * a viewer who raised their browser font size keeps it. The steps below
4647
+ * `normal` are the viewer's explicit choice.
4648
+ *
4649
+ * Motion: `data-motion="reduce"` shortens every animation and transition to
4650
+ * 0.01ms instead of removing it. The end state still arrives and `animationend`
4651
+ * / `transitionend` still fire, so nothing that depends on them breaks and no
4652
+ * information is lost: a spinner's `role="status"` text, a disclosure's open
4653
+ * state and a toast's content are untouched. Scrolling is instant.
4654
+ * ========================================================================= */
4655
+
4656
+ :where(html[data-text-size="smallest"]) { font-size: 80%; }
4657
+ :where(html[data-text-size="smaller"]) { font-size: 90%; }
4658
+ :where(html[data-text-size="small"]) { font-size: 95%; }
4659
+ :where(html[data-text-size="normal"]) { font-size: 100%; }
4660
+ :where(html[data-text-size="large"]) { font-size: 110%; }
4661
+ :where(html[data-text-size="larger"]) { font-size: 125%; }
4662
+ :where(html[data-text-size="largest"]) { font-size: 150%; }
4663
+
4664
+ :where(html[data-motion="reduce"]) {
4665
+ scroll-behavior: auto;
4666
+ }
4667
+ :where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
4668
+ animation-duration: 0.01ms !important;
4669
+ animation-iteration-count: 1 !important;
4670
+ animation-delay: 0s !important;
4671
+ transition-duration: 0.01ms !important;
4672
+ transition-delay: 0s !important;
4673
+ scroll-behavior: auto !important;
4674
+ }
4675
+
4676
+ /* ============================================================================
4677
+ * Forced colours and contrast preference — shared verbatim by all themes.
4678
+ *
4679
+ * Forced colours (Windows High Contrast, `forced-colors: active`): the browser
4680
+ * replaces every colour with a system colour, which erases anything a control
4681
+ * told apart by background alone. These rules give such controls a border,
4682
+ * keep the focus ring, and mark selected and current items with `Highlight`
4683
+ * and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
4684
+ *
4685
+ * Contrast preference (`prefers-contrast: more`): a heavier border on controls
4686
+ * and a thicker focus ring. Colours are not changed here; a theme's colours are
4687
+ * its author's decision.
4688
+ * ========================================================================= */
4689
+
4690
+ @media (forced-colors: active) {
4691
+ :where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
4692
+ border: 1px solid ButtonBorder;
4693
+ }
4694
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4695
+ outline: 3px solid Highlight;
4696
+ outline-offset: 2px;
4697
+ }
4698
+ :where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
4699
+ background: SelectedItem;
4700
+ color: SelectedItemText;
4701
+ forced-color-adjust: none;
4702
+ }
4703
+ :where([aria-current]:not([aria-current="false"])) {
4704
+ outline: 2px solid Highlight;
4705
+ outline-offset: -2px;
4706
+ }
4707
+ :where(:disabled, [aria-disabled="true"]) {
4708
+ border-color: GrayText;
4709
+ color: GrayText;
4710
+ }
4711
+ }
4712
+
4713
+ @media (prefers-contrast: more) {
4714
+ :where(button, input, select, textarea, [role="button"], [class$="-button"]) {
4715
+ border-width: 2px;
4716
+ border-style: solid;
4717
+ border-color: currentColor;
4718
+ }
4719
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4720
+ outline-width: 3px;
4721
+ outline-offset: 2px;
4722
+ }
4723
+ }
4724
+
4725
+ /* ============================================================================
4726
+ * Writing systems — shared verbatim by all themes.
4727
+ *
4728
+ * A theme names its Latin font stack (`--lily-font-body-latin`). This section
4729
+ * builds `--lily-font-body` from it, with the system fonts of the element's
4730
+ * script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
4731
+ * Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
4732
+ * scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
4733
+ * Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
4734
+ * Chinese and Japanese but drawn differently, so the language picks the font,
4735
+ * not the script.
4736
+ *
4737
+ * `--lily-font-body` is re-declared on every element with a `lang`, so a
4738
+ * `<p lang="ja">` inside an English page gets Japanese fonts and a
4739
+ * `<span lang="en">` inside it gets none. A language not listed here keeps the
4740
+ * Latin stack, whose final generic family the browser resolves per language.
4741
+ *
4742
+ * `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
4743
+ * and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
4744
+ * Elements with a `lang` use it; the app's body text should too.
4745
+ *
4746
+ * To change a theme's font, set `--lily-font-body-latin`; to change a script's,
4747
+ * set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
4748
+ * itself still works on the element you set it on.
4749
+ * ========================================================================= */
4750
+
4751
+ :where(:root, [lang]) {
4752
+ --lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
4753
+ --lily-line-height-body: 1.5;
4754
+ }
4755
+
4756
+ :where([lang]) {
4757
+ --lily-font-script: initial;
4758
+ line-height: var(--lily-line-height-body);
4759
+ }
4760
+
4761
+ :where([lang|="zh"], [lang|="wuu"]) {
4762
+ --lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
4763
+ }
4764
+ :where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
4765
+ --lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
4766
+ }
4767
+ :where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
4768
+ --lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
4769
+ }
4770
+ :where([lang|="ja"]) {
4771
+ --lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
4772
+ }
4773
+ :where([lang|="ko"]) {
4774
+ --lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
4775
+ }
4776
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
4777
+ --lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
4778
+ }
4779
+ :where([lang|="ur"]) {
4780
+ --lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
4781
+ }
4782
+ :where([lang|="he"], [lang|="yi"]) {
4783
+ --lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
4784
+ }
4785
+ :where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
4786
+ --lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
4787
+ }
4788
+ :where([lang|="bn"], [lang|="as"]) {
4789
+ --lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
4790
+ }
4791
+ :where([lang|="gu"]) {
4792
+ --lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
4793
+ }
4794
+ :where([lang|="pa"]) {
4795
+ --lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
4796
+ }
4797
+ :where([lang|="kn"]) {
4798
+ --lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
4799
+ }
4800
+ :where([lang|="ta"]) {
4801
+ --lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
4802
+ }
4803
+ :where([lang|="te"]) {
4804
+ --lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
4805
+ }
4806
+ :where([lang|="th"]) {
4807
+ --lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
4808
+ }
4809
+ :where([lang|="lo"]) {
4810
+ --lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
4811
+ }
4812
+ :where([lang|="km"]) {
4813
+ --lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
4814
+ }
4815
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
4816
+ [lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
4817
+ [lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
4818
+ [lang|="lo"], [lang|="km"]) {
4819
+ --lily-line-height-body: 1.75;
4820
+ }