@lilydesignsystem/themes 0.5.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 +967 -31
  3. package/dist/acid.css +966 -30
  4. package/dist/adobe-spectrum.css +968 -32
  5. package/dist/ant-design.css +966 -30
  6. package/dist/aqua.css +968 -32
  7. package/dist/atlassian.css +966 -30
  8. package/dist/australia-agriculture-design-system.css +4569 -0
  9. package/dist/autumn.css +968 -32
  10. package/dist/black.css +967 -31
  11. package/dist/brazil-padrao-digital-de-governo.css +4569 -0
  12. package/dist/bumblebee.css +969 -33
  13. package/dist/business.css +967 -31
  14. package/dist/canada-government-of-canada-design-system.css +4569 -0
  15. package/dist/cappuccino.css +966 -30
  16. package/dist/caramellatte.css +967 -31
  17. package/dist/cmyk.css +966 -30
  18. package/dist/coffee.css +966 -30
  19. package/dist/corporate.css +970 -34
  20. package/dist/cupcake.css +967 -31
  21. package/dist/cyberpunk.css +966 -30
  22. package/dist/dark.css +968 -32
  23. package/dist/dim.css +966 -30
  24. package/dist/dracula.css +966 -30
  25. package/dist/emerald.css +967 -31
  26. package/dist/european-union-europa-component-library.css +4569 -0
  27. package/dist/excel.css +966 -30
  28. package/dist/fantasy.css +967 -31
  29. package/dist/fluent.css +966 -30
  30. package/dist/forest.css +966 -30
  31. package/dist/garden.css +968 -32
  32. package/dist/github-primer.css +966 -30
  33. package/dist/halloween.css +967 -31
  34. package/dist/ibm-carbon.css +966 -30
  35. package/dist/japan-digital-agency-design-system.css +4569 -0
  36. package/dist/lemonade.css +966 -30
  37. package/dist/light.css +967 -31
  38. package/dist/linear.css +966 -30
  39. package/dist/lofi.css +966 -30
  40. package/dist/luxury.css +966 -30
  41. package/dist/mozilla-protocol.css +968 -32
  42. package/dist/night.css +966 -30
  43. package/dist/nord.css +966 -30
  44. package/dist/notion.css +966 -30
  45. package/dist/pastel.css +973 -37
  46. package/dist/retro.css +970 -34
  47. package/dist/salesforce.css +966 -30
  48. package/dist/sap-fiori.css +966 -30
  49. package/dist/silk.css +967 -31
  50. package/dist/singapore-government-design-system.css +4569 -0
  51. package/dist/sunset.css +966 -30
  52. package/dist/synthwave.css +966 -30
  53. package/dist/united-kingdom-government-digital-service.css +966 -30
  54. package/dist/united-kingdom-national-health-service-england-for-patients.css +990 -41
  55. package/dist/united-kingdom-national-health-service-england-for-practitioners.css +988 -39
  56. package/dist/united-kingdom-national-health-service-scotland-for-patients.css +1001 -49
  57. package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +996 -44
  58. package/dist/united-kingdom-national-health-service-wales-for-patients.css +1003 -49
  59. package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +996 -42
  60. package/dist/united-states-web-design-system.css +967 -31
  61. package/dist/valentine.css +970 -34
  62. package/dist/vercel.css +966 -30
  63. package/dist/winter.css +967 -31
  64. package/dist/wireframe.css +966 -30
  65. package/index.md +8 -4
  66. package/package.json +3 -3
@@ -1,12 +1,14 @@
1
1
  /* ============================================================================
2
- * Theme: united-kingdom-national-health-service-wales-patients
2
+ * Theme: united-kingdom-national-health-service-wales-for-patients
3
3
  * Brand: NHS Wales / GIG Cymru (Gwasanaeth Iechyd Gwladol Cymru) — patients
4
4
  * Format: Lily standalone theme
5
5
  *
6
6
  *
7
7
  * Upstream tracked: DHCW / NHS Wales design system (2026 — navy primary,
8
- * gold rail accent, yellow focus). Independent implementation against Lily
9
- * class hooks; not affiliated with or endorsed by NHS Wales / DHCW.
8
+ * gold rail accent, yellow focus; link, hover, visited and active colours
9
+ * from the DHCW Design System private beta of 2026-10-23, read 2026-10-28).
10
+ * Independent implementation against Lily class hooks; not affiliated with
11
+ * or endorsed by NHS Wales / DHCW.
10
12
  * --------------------------------------------------------------------------
11
13
  * Patients variant
12
14
  * --------------------------------------------------------------------------
@@ -58,7 +60,7 @@
58
60
  * When NOT to use this theme:
59
61
  *
60
62
  * - Clinician-only workstations, EPR / eMAR / ePMA, results review
61
- * (use `united-kingdom-national-health-service-wales-practitioners.css`)
63
+ * (use `united-kingdom-national-health-service-wales-for-practitioners.css`)
62
64
  * - Any surface where staff need to scan many rows of clinical data —
63
65
  * this theme's rhythm makes that slow, not fast
64
66
  *
@@ -376,7 +378,7 @@
376
378
  published NHSW library needs that have no slot in the *
377
379
  upstream `--color-*` contract. They are declared here
378
380
  rather than * inline in the component rules so a consumer
379
- can retheme a DHCW * service by overriding tokens alone. *
381
+ can retheme a DHCW * service by overriding tokens alone. *
380
382
  -----------------------------------------------------------
381
383
  ------- */ /* #FFEB3B — `$nhsw-colour-focus`. The GDS-
382
384
  lineage focus block. */
@@ -404,12 +406,20 @@
404
406
  /* #007F3B — the DHCW action-link green. Not NHS Green: it is
405
407
  a shade darker so the 36px chevron reads at 5.1:1 on white. */
406
408
  --lily-action-green: oklch(52% 0.141 151);
407
- /* #7C2855 — `$nhsw-colour-link-visited`. NHS Purple. 9.2:1. */
408
- --lily-link-visited: oklch(42% 0.126 351);
409
- /* #003087 — `$nhsw-colour-link-hover`, NHS Dark Blue /
410
- Pantone 287. No longer the secondary token, but still the
411
- hovered link. 11.9:1. */
412
- --lily-link-hover: oklch(35% 0.153 261);
409
+ /* #005AA8 — `$nhswales-link-colour`, DHCW Design System
410
+ (private beta, 2026-10-23). 6.94:1 on white, 6.26:1 on
411
+ #F0F4F5: AA, just short of AAA. NHS Blue #005EB8 stays on
412
+ --color-secondary for the header band and brand chrome. */
413
+ --lily-link: oklch(46.8% 0.145 253.1);
414
+ /* #002F5C — `$nhswales-link-active-colour`. 13.45:1 on white. */
415
+ --lily-link-active: oklch(30.5% 0.093 252.7);
416
+ /* #330072 — `$nhswales-link-visited-colour`. 15.18:1 on
417
+ white. (Until 2026-10-28 this was #7C2855, which the DHCW
418
+ Design System uses for hover.) */
419
+ --lily-link-visited: oklch(29% 0.162 292.2);
420
+ /* #7C2855 — `$nhswales-link-hover-colour`. 9.16:1 on white.
421
+ (Until 2026-10-28 this was NHS Dark Blue #003087.) */
422
+ --lily-link-hover: oklch(41.8% 0.126 350.8);
413
423
  /* #00A499 — NHS Aqua Green / Pantone 3272. Demoted from the
414
424
  accent slot but retained: DHCW ships an `aqua-green` tag
415
425
  tone, and Public Health Wales and the Welsh Ambulance
@@ -441,6 +451,14 @@
441
451
  --border: 1px;
442
452
  --depth: 0;
443
453
  --noise: 0;
454
+ /* Fluid inline gutter for page containers and the main
455
+ region: grows with the viewport from a 1rem floor to a 2rem
456
+ ceiling. Spacing only, never text. */
457
+ --space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
458
+ /* Fluid gap between sections (stacks and grids): grows with
459
+ the viewport from a 1rem floor to a 2rem ceiling. Spacing
460
+ only, never text. */
461
+ --space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
444
462
  }
445
463
 
446
464
  /* ----------------------------------------------------------------------------
@@ -551,7 +569,7 @@
551
569
  /* --- Typography ---------------------------------------------------- */
552
570
  /* Body font stack — system fonts first so consumers get a
553
571
  native-feeling baseline without shipping a web font. */
554
- --lily-font-body:
572
+ --lily-font-body-latin:
555
573
  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
556
574
  Arial, sans-serif;
557
575
  /* Monospaced font stack — used by code, kbd, identifiers, and
@@ -711,9 +729,12 @@
711
729
  }
712
730
 
713
731
  /* Invalid input — red border. The `aria-invalid="true"` attribute is the
714
- ARIA contract; pairing it with a colour change keeps WCAG 1.4.1
715
- (no colour-only meaning) honest because the ARIA state is also there. */
716
- :where([class$="-input"], .input)[aria-invalid="true"] {
732
+ ARIA contract (server-rendered errors); `:user-invalid` is the native
733
+ state that matches only after the user has interacted, so a required
734
+ field is not styled invalid on load. Pairing a colour change with the
735
+ ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
736
+ :where([class$="-input"], .input)[aria-invalid="true"],
737
+ :where([class$="-input"], .input):user-invalid {
717
738
  border-color: var(--color-error);
718
739
  }
719
740
 
@@ -1071,11 +1092,14 @@
1071
1092
  the published library rather than inventing a third vocabulary, at
1072
1093
  the cost of it not meaning "caution". If you need caution, that is
1073
1094
  the warning-callout below, not a button. */
1095
+ /* DHCW's delete red #D5281B is 5.06:1 under a white label: AA, not the
1096
+ AAA this system targets. The fill is mixed 20% towards black (8.2:1)
1097
+ so the label meets 7:1; the hue is unchanged. */
1074
1098
  :where([class$="-button"], .button)[data-variant="warning"] {
1075
- background-color: var(--color-error);
1099
+ background-color: color-mix(in oklch, var(--color-error) 80%, black);
1076
1100
  color: var(--color-error-content);
1077
- border-color: var(--color-error);
1078
- box-shadow: 0 2px 0 color-mix(in oklch, var(--color-error) 60%, black);
1101
+ border-color: color-mix(in oklch, var(--color-error) 80%, black);
1102
+ box-shadow: 0 2px 0 color-mix(in oklch, var(--color-error) 50%, black);
1079
1103
  }
1080
1104
  :where([class$="-button"], .button)[data-variant="warning"]:hover:not(
1081
1105
  :disabled
@@ -1276,28 +1300,33 @@
1276
1300
  * exclusions (`skip-link`, `back-link`) are styled as buttons above.
1277
1301
  * ====================================================================== */
1278
1302
 
1279
- /* Links are NHS Blue (`$nhsw-colour-link`), i.e. --color-secondary
1280
- under this palette — not the navy primary. Keeping links blue and
1303
+ /* Links are `$nhswales-link-colour` #005AA8 (--lily-link), a shade
1304
+ off NHS Blue #005EB8, which stays on --color-secondary for the
1305
+ header band — not the navy primary. Keeping links blue and
1281
1306
  buttons navy is what lets a reader tell "this navigates" from "this
1282
1307
  acts" without reading either one. */
1283
1308
  :where([class$="-link"]:not(.skip-link):not(.back-link)) {
1284
- color: var(--color-secondary);
1309
+ color: var(--lily-link);
1285
1310
  text-decoration: underline;
1286
1311
  text-underline-offset: 0.12em;
1287
1312
  }
1288
- /* Hover — DHCW drops to NHS Dark Blue #003087 and thickens the rule.
1313
+ /* Hover — DHCW moves to #7C2855 and thickens the rule.
1289
1314
  Both, not either: colour alone is not a state change (WCAG 1.4.1). */
1290
1315
  :where([class$="-link"]):hover {
1291
1316
  color: var(--lily-link-hover);
1292
1317
  text-decoration-thickness: max(3px, 0.1875rem);
1293
1318
  }
1294
- /* Visited — NHS Purple #7C2855 (`$nhsw-colour-link-visited`). Worth
1319
+ /* Visited — #330072 (`$nhswales-link-visited-colour`). Worth
1295
1320
  keeping on a patient surface specifically: someone working through
1296
1321
  a list of conditions or services needs to see where they have
1297
1322
  already been, and that is the whole job of a visited colour. */
1298
1323
  :where([class$="-link"]):visited {
1299
1324
  color: var(--lily-link-visited);
1300
1325
  }
1326
+ /* Active — #002F5C while the link is pressed. */
1327
+ :where([class$="-link"]):active {
1328
+ color: var(--lily-link-active);
1329
+ }
1301
1330
 
1302
1331
  /* ----------------------------------------------------------------------
1303
1332
  * Action link — DHCW's green-chevron call to action
@@ -1441,7 +1470,7 @@
1441
1470
  color: var(--lily-text-muted);
1442
1471
  }
1443
1472
  /* Final crumb (the current page) — muted because it isn't a link. */
1444
- :where(.breadcrumb-list-item[aria-current="page"]) {
1473
+ :where(.breadcrumb-list-item[data-current], .breadcrumb-list-item[aria-current="page"]) {
1445
1474
  color: var(--lily-text-muted);
1446
1475
  }
1447
1476
 
@@ -1710,11 +1739,114 @@
1710
1739
  background-color: var(--color-primary);
1711
1740
  color: var(--color-primary-content);
1712
1741
  }
1713
- /* Today — outlined rather than filled, so a selected non-today date
1714
- still reads as the "selected" one. */
1742
+ /* Today — outlined and bold, never filled, so a selected non-today date still
1743
+ reads as "selected". The ring takes the cell's own text colour (currentColor),
1744
+ so it holds its contrast on a light page, a dark page and a selected cell
1745
+ alike, and the bold number says it without colour. */
1715
1746
  :where(.calendar-table-td[aria-current="date"]) {
1716
- outline: 2px solid var(--color-primary);
1717
- outline-offset: -2px;
1747
+ outline: 2px solid currentColor;
1748
+ outline-offset: -3px;
1749
+ font-weight: 700;
1750
+ }
1751
+ /* Fit a phone: day cells shrink and wrap instead of forcing the grid wider. */
1752
+ :where(.calendar-table) {
1753
+ table-layout: fixed;
1754
+ }
1755
+ :where(.calendar-table-td, .calendar-table-th) {
1756
+ min-width: 0;
1757
+ overflow-wrap: anywhere;
1758
+ }
1759
+
1760
+ /* --- Data grid: toolbar, sorting, pagination, column visibility, pinned columns ----- */
1761
+ :where(.data-grid-toolbar) {
1762
+ display: flex;
1763
+ flex-wrap: wrap;
1764
+ gap: var(--lily-space-sm);
1765
+ align-items: center;
1766
+ margin-block-end: var(--lily-space-sm);
1767
+ }
1768
+ :where(.data-grid-search, .data-grid-search-field) {
1769
+ padding: var(--lily-space-xs) var(--lily-space-sm);
1770
+ border: var(--border) solid var(--lily-border);
1771
+ border-radius: var(--lily-radius-sm);
1772
+ background-color: var(--lily-surface);
1773
+ color: var(--lily-text);
1774
+ font: inherit;
1775
+ }
1776
+ /* A sortable header is a button that looks like its text; the arrow follows aria-sort,
1777
+ so the state is in the markup for assistive technology and on screen for everyone. */
1778
+ :where(.data-grid-sort-button) {
1779
+ padding: 0;
1780
+ border: 0;
1781
+ background: none;
1782
+ color: inherit;
1783
+ font: inherit;
1784
+ text-align: start;
1785
+ cursor: pointer;
1786
+ }
1787
+ :where(.data-grid-sort-button:focus-visible) {
1788
+ outline: 2px solid var(--color-accent);
1789
+ outline-offset: 2px;
1790
+ }
1791
+ :where([aria-sort="none"] .data-grid-sort-button)::after {
1792
+ content: " \21C5";
1793
+ opacity: 0.5;
1794
+ }
1795
+ :where([aria-sort="ascending"] .data-grid-sort-button)::after {
1796
+ content: " \25B2";
1797
+ }
1798
+ :where([aria-sort="descending"] .data-grid-sort-button)::after {
1799
+ content: " \25BC";
1800
+ }
1801
+ :where(.data-grid-pagination) {
1802
+ display: flex;
1803
+ flex-wrap: wrap;
1804
+ gap: var(--lily-space-sm);
1805
+ align-items: center;
1806
+ justify-content: flex-end;
1807
+ margin-block-start: var(--lily-space-sm);
1808
+ }
1809
+ :where(.data-grid-page-previous, .data-grid-page-next, .data-grid-export-button) {
1810
+ padding: var(--lily-space-xs) var(--lily-space-md);
1811
+ border: var(--border) solid var(--lily-border);
1812
+ border-radius: var(--lily-radius-sm);
1813
+ background-color: var(--lily-surface);
1814
+ color: var(--lily-text);
1815
+ font: inherit;
1816
+ cursor: pointer;
1817
+ }
1818
+ :where(.data-grid-page-previous:disabled, .data-grid-page-next:disabled, .data-grid-export-button:disabled) {
1819
+ opacity: 0.5;
1820
+ cursor: not-allowed;
1821
+ }
1822
+ :where(.data-grid-column-visibility) {
1823
+ display: flex;
1824
+ flex-wrap: wrap;
1825
+ gap: var(--lily-space-sm);
1826
+ margin: 0;
1827
+ padding: var(--lily-space-xs) var(--lily-space-sm);
1828
+ border: var(--border) solid var(--lily-border);
1829
+ border-radius: var(--lily-radius-sm);
1830
+ }
1831
+ /* Pinned columns stay put while the rest scroll; the offset is logical, so it flips in right-to-left. */
1832
+ :where([data-pinned="start"]) {
1833
+ position: sticky;
1834
+ inset-inline-start: 0;
1835
+ z-index: 1;
1836
+ background-color: var(--lily-surface);
1837
+ }
1838
+ :where([data-pinned="end"]) {
1839
+ position: sticky;
1840
+ inset-inline-end: 0;
1841
+ z-index: 1;
1842
+ background-color: var(--lily-surface);
1843
+ }
1844
+ :where(th[data-pinned]) {
1845
+ z-index: 2;
1846
+ }
1847
+ /* A missing value: dimmed, and the grid's emptyValue text (for example a dash) reads as absence. */
1848
+ :where(.data-table-td[data-empty]) {
1849
+ opacity: 0.7;
1718
1850
  }
1719
1851
 
1720
1852
  /* --- Kanban specifics --------------------------------------------------- */
@@ -1728,6 +1860,20 @@
1728
1860
  min-width: 14rem;
1729
1861
  }
1730
1862
 
1863
+ /* Dragging a card: the column it would land in is outlined; one that refuses it
1864
+ (canMove, allowedColumns, a full strict WIP limit) is striped and shows the
1865
+ not-allowed cursor, so "you can't drop here" is visible before the drop. */
1866
+ :where(.kanban-table-td[data-drop-target]) {
1867
+ outline: 2px dashed var(--color-accent);
1868
+ outline-offset: -3px;
1869
+ }
1870
+ :where(.kanban-table-td[data-drop-blocked]) {
1871
+ outline: 2px solid var(--color-error);
1872
+ outline-offset: -3px;
1873
+ cursor: not-allowed;
1874
+ background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--color-error) 18%, transparent) 6px 8px);
1875
+ }
1876
+
1731
1877
  /* --- Gantt specifics ---------------------------------------------------- */
1732
1878
  /* Cells marked as bars are filled with the primary colour to render the
1733
1879
  schedule bar inline within the grid. */
@@ -1735,6 +1881,20 @@
1735
1881
  background-color: var(--color-primary);
1736
1882
  }
1737
1883
 
1884
+ /* Weekend, holiday and time-off shading (Gantt chart and calendar). A weekend
1885
+ is tinted; a day marked as a holiday or time off (data-unavailable /
1886
+ data-range) is striped as well, so no day is told apart by colour alone;
1887
+ a column only partly unavailable gets a bar under its header. */
1888
+ :where(.gantt-table-th[data-weekend], .gantt-table-td[data-weekend], .calendar-table-th[data-weekend], .calendar-table-td[data-weekend]) {
1889
+ background-color: color-mix(in srgb, var(--lily-surface) 92%, var(--lily-text));
1890
+ }
1891
+ :where(.gantt-table-th[data-unavailable], .gantt-table-td[data-unavailable], .calendar-table-td[data-range]) {
1892
+ background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--lily-text) 14%, transparent) 4px 5px);
1893
+ }
1894
+ :where(.gantt-table-th[data-partly-unavailable]) {
1895
+ box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--lily-text) 45%, transparent);
1896
+ }
1897
+
1738
1898
  /* ==========================================================================
1739
1899
  * Cards, panels, surfaces
1740
1900
  * --------------------------------------------------------------------------
@@ -2031,13 +2191,17 @@
2031
2191
  padding: 0.75rem 1rem;
2032
2192
  }
2033
2193
 
2034
- /* Sticky promo — sits at the very top of the viewport on scroll. */
2194
+ /* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
2195
+ the component's own bottom: 0 it would stretch over the whole page and take every click. */
2035
2196
  :where(.sticky-promo-banner) {
2036
2197
  position: sticky;
2037
- inset-block-start: 0;
2038
2198
  z-index: 10;
2039
2199
  }
2040
2200
 
2201
+ :where(.sticky-promo-banner:not([data-position="bottom"])) {
2202
+ inset-block-start: 0;
2203
+ }
2204
+
2041
2205
  /* Error message — inline form-validation message. */
2042
2206
  :where(.error-message) {
2043
2207
  color: var(--lily-error-text);
@@ -2117,7 +2281,7 @@
2117
2281
  display: block;
2118
2282
  width: 100%;
2119
2283
  margin-inline: auto;
2120
- padding-inline: 1rem;
2284
+ padding-inline: var(--space-fluid-gutter);
2121
2285
  box-sizing: border-box;
2122
2286
  }
2123
2287
  /* Fixed-width — caps at a comfortable reading width (~1152px). */
@@ -2137,11 +2301,11 @@
2137
2301
  :where(.flex-stack) {
2138
2302
  display: flex;
2139
2303
  flex-direction: column;
2140
- gap: 1rem;
2304
+ gap: var(--space-fluid-section);
2141
2305
  }
2142
2306
  :where(.grid) {
2143
2307
  display: grid;
2144
- gap: 1rem;
2308
+ gap: var(--space-fluid-section);
2145
2309
  }
2146
2310
  :where(.masonry) {
2147
2311
  column-count: 3;
@@ -2196,7 +2360,7 @@
2196
2360
  :where(.content-block) {
2197
2361
  max-width: var(--content-width-normal);
2198
2362
  margin-inline: auto;
2199
- padding-inline: 1rem;
2363
+ padding-inline: var(--space-fluid-gutter);
2200
2364
  box-sizing: border-box;
2201
2365
  }
2202
2366
  :where(.content-block[data-width="narrower"]) {
@@ -2214,7 +2378,8 @@
2214
2378
 
2215
2379
  /* --- Grail layout (5-region responsive page shell) --------------------- */
2216
2380
  /* Header spans the top; left-aside / main / right-aside fill the middle;
2217
- footer spans the bottom. At ≤768px the asides drop below the main. */
2381
+ footer spans the bottom. The collapse as the window narrows is in the shared
2382
+ container section at the end of this file. */
2218
2383
  :where(.grail-layout) {
2219
2384
  display: grid;
2220
2385
  min-height: 100vh;
@@ -2254,15 +2419,7 @@
2254
2419
  }
2255
2420
  /* Main content area — primary surface, more generous padding. */
2256
2421
  :where(.grail-layout-center-main) {
2257
- padding: 1.5rem;
2258
- }
2259
- /* Mobile breakpoint — collapse to a single column, stacking the regions. */
2260
- @media (max-width: 48rem) {
2261
- :where(.grail-layout) {
2262
- grid-template-areas: "header" "main" "left" "right" "footer";
2263
- grid-template-columns: 1fr;
2264
- grid-template-rows: auto auto auto auto auto;
2265
- }
2422
+ padding: var(--space-fluid-gutter);
2266
2423
  }
2267
2424
 
2268
2425
  /* Standalone semantic header / footer landmarks. */
@@ -2353,6 +2510,15 @@
2353
2510
  /* Drawers — side panels (right edge by default; RTL-aware via logical
2354
2511
  properties). Sit above the overlay container (z-index 101). */
2355
2512
  :where(.drawer, .slide-out-drawer, .sheet) {
2513
+ /* These are <dialog> elements opened with showModal() (P18-T6): undo the
2514
+ browser's centred-box defaults so the panel docks to the edge. */
2515
+ margin: 0;
2516
+ border: 0;
2517
+ inset-inline-start: auto;
2518
+ max-block-size: none;
2519
+ max-inline-size: none;
2520
+ block-size: 100%;
2521
+ box-sizing: border-box;
2356
2522
  position: fixed;
2357
2523
  inset-block: 0;
2358
2524
  inset-inline-end: 0;
@@ -2365,6 +2531,10 @@
2365
2531
  z-index: 101;
2366
2532
  }
2367
2533
 
2534
+ :where(.drawer, .slide-out-drawer, .sheet)::backdrop {
2535
+ background-color: color-mix(in oklch, black 50%, transparent);
2536
+ }
2537
+
2368
2538
  /* ==========================================================================
2369
2539
  * Menus
2370
2540
  * ====================================================================== */
@@ -2417,7 +2587,7 @@
2417
2587
  gap: 0.25rem;
2418
2588
  }
2419
2589
  /* Hamburger — bordered icon-button. */
2420
- :where(.hamburger-menu) {
2590
+ :where(.hamburger-menu > button) {
2421
2591
  display: inline-flex;
2422
2592
  align-items: center;
2423
2593
  justify-content: center;
@@ -2892,6 +3062,7 @@
2892
3062
  .theme-picker,
2893
3063
  .locale-picker,
2894
3064
  .text-size-picker,
3065
+ .time-zone-picker,
2895
3066
  .search-picker,
2896
3067
  .link-picker,
2897
3068
  .menu-picker,
@@ -2907,6 +3078,7 @@
2907
3078
  .theme-picker-button,
2908
3079
  .locale-picker-button,
2909
3080
  .text-size-picker-button,
3081
+ .time-zone-picker-button,
2910
3082
  .search-picker-button,
2911
3083
  .link-picker-button,
2912
3084
  .menu-picker-button,
@@ -2945,6 +3117,7 @@
2945
3117
  .theme-picker-icon,
2946
3118
  .locale-picker-icon,
2947
3119
  .text-size-picker-icon,
3120
+ .time-zone-picker-icon,
2948
3121
  .motion-picker-icon,
2949
3122
  .link-picker-icon,
2950
3123
  .menu-picker-icon,
@@ -3312,6 +3485,7 @@
3312
3485
  .theme-picker-tooltip,
3313
3486
  .locale-picker-tooltip,
3314
3487
  .text-size-picker-tooltip,
3488
+ .time-zone-picker-tooltip,
3315
3489
  .motion-picker-tooltip,
3316
3490
  .link-picker-tooltip,
3317
3491
  .menu-picker-tooltip,
@@ -3339,6 +3513,7 @@
3339
3513
  .theme-picker-tooltip,
3340
3514
  .locale-picker-tooltip,
3341
3515
  .text-size-picker-tooltip,
3516
+ .time-zone-picker-tooltip,
3342
3517
  .motion-picker-tooltip,
3343
3518
  .link-picker-tooltip,
3344
3519
  .menu-picker-tooltip,
@@ -3358,6 +3533,7 @@
3358
3533
  .theme-picker-tooltip,
3359
3534
  .locale-picker-tooltip,
3360
3535
  .text-size-picker-tooltip,
3536
+ .time-zone-picker-tooltip,
3361
3537
  .motion-picker-tooltip,
3362
3538
  .link-picker-tooltip,
3363
3539
  .menu-picker-tooltip,
@@ -3414,6 +3590,7 @@
3414
3590
  .theme-picker-list,
3415
3591
  .locale-picker-list,
3416
3592
  .text-size-picker-list,
3593
+ .time-zone-picker-list,
3417
3594
  .motion-picker-list,
3418
3595
  .link-picker-list,
3419
3596
  .menu-picker-panel,
@@ -3443,6 +3620,7 @@
3443
3620
  .theme-picker-list,
3444
3621
  .locale-picker-list,
3445
3622
  .text-size-picker-list,
3623
+ .time-zone-picker-list,
3446
3624
  .motion-picker-list,
3447
3625
  .link-picker-list,
3448
3626
  .menu-picker-panel,
@@ -3463,6 +3641,7 @@
3463
3641
  :where(.theme-picker) { anchor-name: --lily-theme-picker; }
3464
3642
  :where(.locale-picker) { anchor-name: --lily-locale-picker; }
3465
3643
  :where(.text-size-picker) { anchor-name: --lily-text-size-picker; }
3644
+ :where(.time-zone-picker) { anchor-name: --lily-time-zone-picker; }
3466
3645
  :where(.motion-picker) { anchor-name: --lily-motion-picker; }
3467
3646
  :where(.link-picker) { anchor-name: --lily-link-picker; }
3468
3647
  :where(.menu-picker) { anchor-name: --lily-menu-picker; }
@@ -3472,6 +3651,7 @@
3472
3651
  :where(.theme-picker-list) { position-anchor: --lily-theme-picker; }
3473
3652
  :where(.locale-picker-list) { position-anchor: --lily-locale-picker; }
3474
3653
  :where(.text-size-picker-list) { position-anchor: --lily-text-size-picker; }
3654
+ :where(.time-zone-picker-list) { position-anchor: --lily-time-zone-picker; }
3475
3655
  :where(.motion-picker-list) { position-anchor: --lily-motion-picker; }
3476
3656
  :where(.link-picker-list) { position-anchor: --lily-link-picker; }
3477
3657
  :where(.menu-picker-panel) { position-anchor: --lily-menu-picker; }
@@ -3482,6 +3662,7 @@
3482
3662
  .theme-picker-list,
3483
3663
  .locale-picker-list,
3484
3664
  .text-size-picker-list,
3665
+ .time-zone-picker-list,
3485
3666
  .motion-picker-list,
3486
3667
  .link-picker-list,
3487
3668
  .menu-picker-panel,
@@ -3499,11 +3680,56 @@
3499
3680
  }
3500
3681
  }
3501
3682
 
3502
- :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
3683
+ /* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
3684
+ browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
3685
+ where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
3686
+ open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
3687
+ hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
3688
+ `position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
3689
+ position-area: with no anchor, position-area does nothing and a static position can be off screen. */
3690
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
3691
+ display: none;
3692
+ }
3693
+
3694
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
3695
+ display: none;
3696
+ }
3697
+
3698
+ @supports (position-area: block-end) {
3699
+ :where(.cascader-trigger) { anchor-name: --lily-cascader; }
3700
+ :where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
3701
+ :where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
3702
+ :where(.combobox > input) { anchor-name: --lily-combobox; }
3703
+ :where(.cascader-panel) { position-anchor: --lily-cascader; }
3704
+ :where(.tree-select-panel) { position-anchor: --lily-tree-select; }
3705
+ :where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
3706
+ :where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
3707
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3708
+ position: fixed;
3709
+ inset: auto;
3710
+ margin: 0;
3711
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
3712
+ width: max-content;
3713
+ max-width: calc(100vw - 1rem);
3714
+ }
3715
+ :where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
3716
+ inset-block-start: anchor(end, 25%);
3717
+ inset-inline-start: anchor(start, 25%);
3718
+ }
3719
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3720
+ position-area: block-end span-inline-end;
3721
+ }
3722
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
3723
+ min-inline-size: anchor-size(inline);
3724
+ }
3725
+ }
3726
+
3727
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
3503
3728
  > :where(
3504
3729
  .theme-picker-option,
3505
3730
  .locale-picker-option,
3506
3731
  .text-size-picker-option,
3732
+ .time-zone-picker-option,
3507
3733
  .motion-picker-option
3508
3734
  ) {
3509
3735
  padding: var(--lily-space-xs) var(--lily-space-sm);
@@ -3513,7 +3739,7 @@
3513
3739
 
3514
3740
  /* data-active is the keyboard cursor (aria-activedescendant); focus
3515
3741
  stays on the listbox, so this is the only visible cue for it. */
3516
- :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
3742
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
3517
3743
  > :where([data-active]) {
3518
3744
  background-color: var(--lily-surface-alt);
3519
3745
  outline: var(--lily-focus-ring);
@@ -3522,7 +3748,7 @@
3522
3748
 
3523
3749
  /* aria-selected marks the applied theme/locale, which is not the
3524
3750
  same thing as the keyboard cursor. Both can be visible at once. */
3525
- :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
3751
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
3526
3752
  > :where([aria-selected="true"]) {
3527
3753
  font-weight: 600;
3528
3754
  background-color: var(--lily-surface-sunken);
@@ -3911,7 +4137,7 @@
3911
4137
  }
3912
4138
  /* Screen-reader-only — visually hidden but available to AT. The
3913
4139
  classic clip-rect pattern (works in every screen reader). */
3914
- :where(.screen-reader-span) {
4140
+ :where(.screen-reader-span, .middle-truncation-full) {
3915
4141
  position: absolute;
3916
4142
  width: 1px;
3917
4143
  height: 1px;
@@ -3922,6 +4148,42 @@
3922
4148
  white-space: nowrap;
3923
4149
  border: 0;
3924
4150
  }
4151
+ /* Middle truncation — a bounded one-line block; the shortened string is aria-hidden and the full
4152
+ text (hidden above) stays in the accessibility tree. */
4153
+ :where(.middle-truncation) {
4154
+ display: block;
4155
+ position: relative;
4156
+ overflow: hidden;
4157
+ white-space: nowrap;
4158
+ }
4159
+ /* Wheel picker — a scrolling listbox that snaps the chosen option to the centre. The selected option is filled with the
4160
+ primary colour (aria-selected, not colour alone: it is also the activedescendant and gets a bold weight). */
4161
+ :where(.wheel-picker-list) {
4162
+ max-block-size: 10em;
4163
+ overflow-y: auto;
4164
+ overscroll-behavior: contain;
4165
+ scroll-snap-type: y mandatory;
4166
+ border: 1px solid var(--color-base-300);
4167
+ border-radius: var(--lily-radius-md);
4168
+ }
4169
+ :where(.wheel-picker-list:focus-visible) {
4170
+ outline: 2px solid var(--lily-focus-ring);
4171
+ outline-offset: 2px;
4172
+ }
4173
+ :where(.wheel-picker-option) {
4174
+ padding: 0.5rem 1rem;
4175
+ scroll-snap-align: center;
4176
+ cursor: pointer;
4177
+ }
4178
+ :where(.wheel-picker-option[aria-selected="true"]) {
4179
+ background-color: var(--color-primary);
4180
+ color: var(--color-primary-content);
4181
+ font-weight: 600;
4182
+ }
4183
+ :where(.wheel-picker-option[aria-disabled="true"]) {
4184
+ opacity: 0.5;
4185
+ cursor: not-allowed;
4186
+ }
3925
4187
 
3926
4188
  /* ==========================================================================
3927
4189
  * Hero, figure, photo, media
@@ -4640,6 +4902,81 @@
4640
4902
  min-block-size: 24px;
4641
4903
  }
4642
4904
 
4905
+ /* ============================================================================
4906
+ * Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
4907
+ *
4908
+ * Where the primary pointer is coarse (a finger), interactive hooks are at least
4909
+ * 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
4910
+ * buttons, form fields, checkboxes and radios, and the link-shaped navigation
4911
+ * hooks. Links inside running text are exempt, so bare `a` is not listed. The
4912
+ * query is the capability, never a viewport width. :where() keeps specificity
4913
+ * at zero, so any consumer rule still wins.
4914
+ * ========================================================================= */
4915
+
4916
+ @media (pointer: coarse) {
4917
+ :where(button,
4918
+ [role="button"],
4919
+ [role="tab"],
4920
+ [role="option"],
4921
+ [role="menuitem"],
4922
+ [class*="-picker-button"],
4923
+ summary,
4924
+ input:not([type="hidden"]),
4925
+ select,
4926
+ textarea,
4927
+ .action-link,
4928
+ .back-link,
4929
+ .breadcrumb-list-item > a,
4930
+ .pagination-list-item > a,
4931
+ .contents-list-item > a,
4932
+ .section-list-item > a) {
4933
+ min-inline-size: 44px;
4934
+ min-block-size: 44px;
4935
+ }
4936
+ }
4937
+
4938
+ /* ============================================================================
4939
+ * Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
4940
+ *
4941
+ * --lily-brand is the identity's decorative colour: a header band, a rule, a
4942
+ * logo background. It is NEVER a text colour or a control's boundary, because a
4943
+ * brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
4944
+ * text drawn on it. By default they follow the theme's primary pair, which every
4945
+ * theme keeps readable; an adopter whose brand colour is lighter or darker sets
4946
+ * both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
4947
+ * content pairs (--color-base-content, --lily-error-text and so on).
4948
+ * ========================================================================== */
4949
+
4950
+ :where(:root) {
4951
+ --lily-brand: var(--color-primary);
4952
+ --lily-on-brand: var(--color-primary-content);
4953
+ }
4954
+
4955
+ /* ============================================================================
4956
+ * Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
4957
+ *
4958
+ * The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
4959
+ * adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
4960
+ * and no clear-space rule, because national and local guidelines disagree: a
4961
+ * theme or the adopter sets --lily-logo-clear-space (padding around the mark)
4962
+ * and --lily-logo-min-size (its smallest inline size). Both are unset by
4963
+ * default, so nothing changes until one is set.
4964
+ * ========================================================================== */
4965
+
4966
+ @layer lily {
4967
+ :where([data-lily-logo]) {
4968
+ display: inline-block;
4969
+ padding: var(--lily-logo-clear-space, 0);
4970
+ }
4971
+
4972
+ :where([data-lily-logo] > img, [data-lily-logo] > svg) {
4973
+ display: block;
4974
+ min-inline-size: var(--lily-logo-min-size, 0);
4975
+ max-inline-size: 100%;
4976
+ block-size: auto;
4977
+ }
4978
+ }
4979
+
4643
4980
  /* ============================================================================
4644
4981
  * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
4645
4982
  *
@@ -4667,3 +5004,620 @@
4667
5004
  :where(a, code) {
4668
5005
  overflow-wrap: anywhere;
4669
5006
  }
5007
+
5008
+ /* ============================================================================
5009
+ * Scoped overflow — shared verbatim by all themes.
5010
+ *
5011
+ * Long unbroken strings (a national identifier, an email address, a URL) and
5012
+ * grid/flex tracks that refuse to shrink are the usual causes of horizontal
5013
+ * page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
5014
+ * `overflow-wrap: anywhere` on the places a long value lands (table cells are
5015
+ * covered by Overflow guards above), and `min-inline-size: 0` on the direct
5016
+ * children of Lily's grid and flex containers so a child can shrink below its
5017
+ * content. The identifier `-view` list below is the catalog's 70 national
5018
+ * identifier views (components-categories.tsv); bin/check-theme fails when it
5019
+ * drifts from the catalog. :where() keeps specificity at zero.
5020
+ * ========================================================================= */
5021
+
5022
+ :where(
5023
+ .alba-community-health-index-view,
5024
+ .australia-individual-healthcare-identifier-view,
5025
+ .belgique-numero-de-registre-national-view,
5026
+ .bulgaria-edinen-grazhdanski-nomer-view,
5027
+ .cesko-cestovni-pas-view,
5028
+ .cesko-rodne-cislo-view,
5029
+ .cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
5030
+ .kypros-national-passport-number-view,
5031
+ .danmark-personnummer-view,
5032
+ .deutschland-krankenversichertennummer-view,
5033
+ .eesti-isikukood-view,
5034
+ .ellada-dematerialised-securities-system-view,
5035
+ .england-national-health-service-number-view,
5036
+ .espana-codigo-de-identificacion-fiscal-view,
5037
+ .espana-tarjeta-sanitaria-individual-view,
5038
+ .france-numero-d-identification-au-repertoire-view,
5039
+ .hrvatska-osobni-identifikacijski-broj-view,
5040
+ .eire-individual-health-identifier-view,
5041
+ .island-kennitala-view,
5042
+ .italia-codice-fiscale-view,
5043
+ .latvija-personas-kods-view,
5044
+ .liechtenstein-national-identity-card-number-view,
5045
+ .liechtenstein-passport-number-view,
5046
+ .lietuva-asmens-kodas-view,
5047
+ .lietuva-pasas-view,
5048
+ .malta-national-identification-number-view,
5049
+ .malta-passport-number-view,
5050
+ .nederland-burgerservice-nummer-view,
5051
+ .nederland-identiteitskaart-nummer-view,
5052
+ .nederland-paspoort-nummer-view,
5053
+ .norge-fodselsnummer-view,
5054
+ .tuaisceart-eireann-health-and-care-number-view,
5055
+ .polska-numer-identyfikacji-podatkowej-view,
5056
+ .polska-pesel-view,
5057
+ .portugal-numero-de-identificacao-fiscal-view,
5058
+ .portugal-passaporte-view,
5059
+ .romania-cod-numeric-personal-view,
5060
+ .romania-pasaport-view,
5061
+ .slovenija-emso-view,
5062
+ .slovensko-pas-view,
5063
+ .slovensko-rodne-cislo-view,
5064
+ .suomi-henkilotunnus-view,
5065
+ .sverige-personnummer-view,
5066
+ .iban-view,
5067
+ .united-kingdom-national-health-service-number-view,
5068
+ .united-kingdom-national-insurance-number-view,
5069
+ .united-states-social-security-number-view,
5070
+ .aotearoa-national-health-index-view,
5071
+ .pilipinas-philhealth-identification-number-view,
5072
+ .brasil-cartao-nacional-de-saude-view,
5073
+ .schweiz-ahv-nummer-view,
5074
+ .canada-social-insurance-number-view,
5075
+ .hanguk-jumin-deungnok-beonho-view,
5076
+ .nihon-kojin-bango-view,
5077
+ .bharat-aadhaar-view,
5078
+ .yisrael-teudat-zehut-view,
5079
+ .south-africa-identity-number-view,
5080
+ .mexico-clave-unica-de-registro-de-poblacion-view,
5081
+ .singapore-national-registration-identity-card-view,
5082
+ .osterreich-sozialversicherungsnummer-view,
5083
+ .magyarorszag-taj-szam-view,
5084
+ .luxembourg-matricule-view,
5085
+ .zhongguo-jumin-shenfenzheng-haoma-view,
5086
+ .rossiya-snils-view,
5087
+ .turkiye-tc-kimlik-numarasi-view,
5088
+ .argentina-codigo-unico-de-identificacion-laboral-view,
5089
+ .ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
5090
+ .indonesia-nomor-induk-kependudukan-view,
5091
+ .prathet-thai-lek-prajam-tua-prachachon-view,
5092
+ .chile-rol-unico-nacional-view,
5093
+ .taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
5094
+ .hong-kong-identity-card-view,
5095
+ .iran-kod-e-melli-view,
5096
+ .as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
5097
+ .malaysia-kad-pengenalan-view,
5098
+ .viet-nam-can-cuoc-cong-dan-view,
5099
+ .pakistan-computerized-national-identity-card-view,
5100
+ .uruguay-cedula-de-identidad-view,
5101
+ .ecuador-cedula-de-identidad-view,
5102
+ .colombia-cedula-de-ciudadania-view,
5103
+ .australia-tax-file-number-view,
5104
+ .nigeria-national-identification-number-view,
5105
+ .misr-al-raqm-al-qawmi-view
5106
+ ) {
5107
+ overflow-wrap: anywhere;
5108
+ }
5109
+
5110
+ /* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
5111
+ :where(.summary-list, .summary-list-item, .description-list) {
5112
+ overflow-wrap: anywhere;
5113
+ }
5114
+
5115
+ :where(
5116
+ .grid,
5117
+ .flex-stack,
5118
+ .grail-layout,
5119
+ .summary-list,
5120
+ .summary-list-item,
5121
+ .description-list,
5122
+ .form,
5123
+ .editable-form,
5124
+ .field,
5125
+ .input-group,
5126
+ .button-group,
5127
+ .radio-group,
5128
+ .checkbox-group,
5129
+ .toggle-group,
5130
+ .tag-group,
5131
+ .split-view,
5132
+ .photo-pack,
5133
+ .data-filter-form,
5134
+ .action-bar,
5135
+ .tool-bar,
5136
+ .menu-bar,
5137
+ .tab-bar
5138
+ ) > :where(*) {
5139
+ min-inline-size: 0;
5140
+ }
5141
+
5142
+ /* ============================================================================
5143
+ * Helper packages — layout and look, shared verbatim by all themes.
5144
+ *
5145
+ * The data grid, kanban board, Gantt chart and calendar view are wide by nature.
5146
+ * Each root scrolls sideways inside its own box and its table sizes to its content,
5147
+ * so a narrow screen scrolls the table instead of wrapping every cell to a letter
5148
+ * (the overflow guard above lets cells break anywhere, which is right for prose and
5149
+ * wrong for a table that has a scroller). The toolbar controls of all four helpers
5150
+ * share the data grid's look, every button has a >=24px target (WCAG 2.2 2.5.8), and
5151
+ * the Gantt chart draws its bars from `data-in-range`, a milestone as a diamond and
5152
+ * today as a rule. :where() keeps specificity at zero, so any consumer rule wins.
5153
+ * ========================================================================= */
5154
+
5155
+ :where(.data-grid, .kanban-board, .gantt-chart, .calendar-view) {
5156
+ max-inline-size: 100%;
5157
+ overflow-x: auto;
5158
+ }
5159
+
5160
+ :where(.data-grid table, .kanban-board table, .gantt-chart table, .calendar-view table) {
5161
+ inline-size: max-content;
5162
+ min-inline-size: 100%;
5163
+ }
5164
+
5165
+ :where(.kanban-board-export, .gantt-chart-export, .gantt-chart-zoom, .calendar-view-export,
5166
+ .calendar-view-toolbar, .calendar-view-nav, .calendar-view-switcher) {
5167
+ display: flex;
5168
+ flex-wrap: wrap;
5169
+ gap: var(--lily-space-sm);
5170
+ align-items: center;
5171
+ margin-block-end: var(--lily-space-sm);
5172
+ }
5173
+
5174
+ :where(.kanban-board-search, .gantt-chart-search, .calendar-view-search) {
5175
+ padding: var(--lily-space-xs) var(--lily-space-sm);
5176
+ border: var(--border) solid var(--lily-border);
5177
+ border-radius: var(--lily-radius-sm);
5178
+ background-color: var(--lily-surface);
5179
+ color: var(--lily-text);
5180
+ font: inherit;
5181
+ min-block-size: 24px;
5182
+ }
5183
+
5184
+ :where(.kanban-board-export-button,
5185
+ .kanban-board-add-button,
5186
+ .kanban-board-undo-button,
5187
+ .kanban-board-collapse-button,
5188
+ .kanban-board-lane-toggle,
5189
+ .kanban-board-move-button,
5190
+ .gantt-chart-export-button,
5191
+ .gantt-chart-zoom-in-button,
5192
+ .gantt-chart-zoom-out-button,
5193
+ .gantt-chart-collapse-button,
5194
+ .gantt-chart-collapse-all-button,
5195
+ .gantt-chart-expand-all-button,
5196
+ .gantt-chart-save-button,
5197
+ .gantt-chart-cancel-button,
5198
+ .calendar-view-export-button,
5199
+ .calendar-view-previous-button,
5200
+ .calendar-view-next-button,
5201
+ .calendar-view-today-button,
5202
+ .calendar-view-switcher-button) {
5203
+ padding: var(--lily-space-xs) var(--lily-space-md);
5204
+ border: var(--border) solid var(--lily-border);
5205
+ border-radius: var(--lily-radius-sm);
5206
+ background-color: var(--lily-surface);
5207
+ color: var(--lily-text);
5208
+ font: inherit;
5209
+ cursor: pointer;
5210
+ min-inline-size: 24px;
5211
+ min-block-size: 24px;
5212
+ }
5213
+
5214
+ :where(.kanban-board-export-button:disabled,
5215
+ .kanban-board-add-button:disabled,
5216
+ .kanban-board-undo-button:disabled,
5217
+ .gantt-chart-export-button:disabled,
5218
+ .gantt-chart-zoom-in-button:disabled,
5219
+ .gantt-chart-zoom-out-button:disabled,
5220
+ .calendar-view-export-button:disabled,
5221
+ .calendar-view-previous-button[aria-disabled="true"],
5222
+ .calendar-view-next-button[aria-disabled="true"]) {
5223
+ opacity: 0.5;
5224
+ cursor: not-allowed;
5225
+ }
5226
+
5227
+ :where(.calendar-view-switcher-button[aria-pressed="true"]) {
5228
+ background-color: var(--color-base-300);
5229
+ font-weight: 600;
5230
+ }
5231
+
5232
+ :where(.kanban-board-status, .gantt-chart-status, .calendar-view-status) {
5233
+ margin-block-start: var(--lily-space-sm);
5234
+ font-size: 0.875em;
5235
+ opacity: 0.8;
5236
+ }
5237
+
5238
+ :where(.calendar-view-event) {
5239
+ display: block;
5240
+ padding: 0 var(--lily-space-xs);
5241
+ border-radius: var(--lily-radius-sm);
5242
+ background-color: color-mix(in srgb, var(--color-primary) 18%, transparent);
5243
+ font-size: 0.75rem;
5244
+ }
5245
+
5246
+ :where(.gantt-table-th) {
5247
+ min-inline-size: 2rem;
5248
+ padding-inline: 0.25rem;
5249
+ font-size: 0.75rem;
5250
+ text-align: center;
5251
+ white-space: nowrap;
5252
+ }
5253
+
5254
+ :where(.gantt-table-th[scope="row"], .gantt-table-th:first-child) {
5255
+ min-inline-size: 10rem;
5256
+ padding-inline: var(--lily-space-sm);
5257
+ font-size: inherit;
5258
+ text-align: start;
5259
+ white-space: normal;
5260
+ }
5261
+
5262
+ :where(.gantt-table-td) {
5263
+ min-block-size: 1.7rem;
5264
+ padding: 0;
5265
+ }
5266
+
5267
+ :where(.gantt-table-td[data-in-range]) {
5268
+ background-color: var(--color-primary);
5269
+ /* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
5270
+ color: var(--color-primary-content);
5271
+ }
5272
+
5273
+ :where(.gantt-table-td[data-in-range][data-milestone]) {
5274
+ clip-path: polygon(50% 8%, 92% 50%, 50% 92%, 8% 50%);
5275
+ }
5276
+
5277
+ :where(.gantt-table-td[data-today]) {
5278
+ border-inline-start: 2px solid var(--color-accent);
5279
+ }
5280
+
5281
+ /* The time zone picker's options are long ("UTC+10:30 – Lord Howe Daylight Time"): size the list to its widest
5282
+ option up to a cap, then wrap, rather than clipping the name or running off a phone. */
5283
+ :where(.time-zone-picker-list) {
5284
+ inline-size: max-content;
5285
+ max-inline-size: min(26rem, 90vw);
5286
+ max-block-size: min(24rem, 70vh);
5287
+ overflow-y: auto;
5288
+ }
5289
+
5290
+ :where(.time-zone-picker-option) {
5291
+ overflow-wrap: anywhere;
5292
+ }
5293
+
5294
+ /* ============================================================================
5295
+ * Overflow navigation — shared verbatim by all themes.
5296
+ *
5297
+ * The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
5298
+ * With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
5299
+ * (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
5300
+ * the links that do not fit into the More list. That list is in normal flow (position
5301
+ * static, never absolute), so opening it pushes the content below down and never covers it
5302
+ * (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
5303
+ * specificity at zero, so any consumer rule wins.
5304
+ * ========================================================================= */
5305
+
5306
+ :where(.navigation-menu-list) {
5307
+ display: flex;
5308
+ flex: 1 1 auto;
5309
+ flex-wrap: wrap;
5310
+ align-items: flex-start;
5311
+ gap: 0.25rem 0.5rem;
5312
+ min-inline-size: 0;
5313
+ margin: 0;
5314
+ padding: 0;
5315
+ list-style: none;
5316
+ }
5317
+
5318
+ :where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
5319
+ display: inline-block;
5320
+ min-inline-size: 24px;
5321
+ min-block-size: 24px;
5322
+ }
5323
+
5324
+ :where(.navigation-menu-more) {
5325
+ position: static;
5326
+ }
5327
+
5328
+ :where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
5329
+ display: none;
5330
+ }
5331
+
5332
+ :where(.navigation-menu-more-button) {
5333
+ min-inline-size: 24px;
5334
+ min-block-size: 24px;
5335
+ padding: 0.25rem 0.5rem;
5336
+ font: inherit;
5337
+ color: inherit;
5338
+ background: transparent;
5339
+ border: 1px solid currentcolor;
5340
+ cursor: pointer;
5341
+ }
5342
+
5343
+ :where(.navigation-menu-more-list) {
5344
+ position: static;
5345
+ margin: 0.25rem 0 0;
5346
+ padding: 0;
5347
+ list-style: none;
5348
+ }
5349
+
5350
+ /* ============================================================================
5351
+ * Container queries — shared verbatim by all themes.
5352
+ *
5353
+ * A component answers to the space it is given, not to the window: a summary
5354
+ * list in a narrow aside on a wide screen needs the narrow layout, which the
5355
+ * viewport query above cannot know. The three grail-layout regions are the
5356
+ * containers because their width comes from a grid track (`minmax(0, 1fr)`), so
5357
+ * inline-size containment cannot collapse them. `.card` is deliberately not a
5358
+ * container: in a shrink-to-fit parent (a flex row, an inline grid) containment
5359
+ * would collapse it to nothing. A component outside a grail region has no
5360
+ * container and keeps its wide layout. :where() keeps specificity at zero, so
5361
+ * any consumer rule wins.
5362
+ * ========================================================================= */
5363
+
5364
+ :where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
5365
+ container-type: inline-size;
5366
+ }
5367
+
5368
+ /* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
5369
+ window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
5370
+ Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
5371
+ (at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
5372
+ right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
5373
+ hidden, so all content stays reachable. */
5374
+ @media (max-width: 64rem) {
5375
+ :where(.grail-layout) {
5376
+ grid-template-areas:
5377
+ "header header"
5378
+ "left main"
5379
+ "right right"
5380
+ "footer footer";
5381
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
5382
+ grid-template-rows: auto auto auto auto;
5383
+ }
5384
+ }
5385
+
5386
+ @media (max-width: 48rem) {
5387
+ :where(.grail-layout) {
5388
+ grid-template-areas:
5389
+ "header"
5390
+ "left"
5391
+ "main"
5392
+ "right"
5393
+ "footer";
5394
+ grid-template-columns: minmax(0, 1fr);
5395
+ grid-template-rows: auto auto auto auto auto;
5396
+ }
5397
+ }
5398
+
5399
+ @container (max-width: 30rem) {
5400
+ :where(.summary-list) {
5401
+ grid-template-columns: minmax(0, 1fr);
5402
+ row-gap: 0.25rem;
5403
+ }
5404
+
5405
+ :where(.kanban-table-td) {
5406
+ min-width: 10rem;
5407
+ }
5408
+
5409
+ :where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
5410
+ padding-inline: 0.5rem;
5411
+ }
5412
+ }
5413
+
5414
+ /* ============================================================================
5415
+ * Focus not obscured — shared verbatim by all themes.
5416
+ *
5417
+ * WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
5418
+ * entirely hidden by author-created content, such as a bar fixed to the top or
5419
+ * bottom of the viewport. The browser scrolls a focused control into view, but
5420
+ * only as far as the edge of the viewport, which is where a fixed bar sits.
5421
+ * `scroll-padding` moves that edge in by the bar's height.
5422
+ *
5423
+ * Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
5424
+ * theme's or an app's own fixed header, a mobile bottom navigation) sets the
5425
+ * bar's height on the root element:
5426
+ *
5427
+ * --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
5428
+ * --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
5429
+ *
5430
+ * With both bars, set both. The defaults are 0px, so a page without a fixed bar
5431
+ * is unchanged. Specificity is zero (`:where`), so an app's own
5432
+ * `scroll-padding` wins.
5433
+ * ========================================================================= */
5434
+
5435
+ :where(html) {
5436
+ scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
5437
+ }
5438
+
5439
+ /* ============================================================================
5440
+ * Text size and motion preferences — shared verbatim by all themes.
5441
+ *
5442
+ * The text-size-picker sets `data-text-size` on the root and the motion-picker
5443
+ * sets `data-motion`; neither styles anything itself. These rules are what make
5444
+ * the choice visible.
5445
+ *
5446
+ * Text size: the seven steps scale the root font size, and every theme sizes in
5447
+ * `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
5448
+ * own browser setting), and the scale is percentages of that, never pixels, so
5449
+ * a viewer who raised their browser font size keeps it. The steps below
5450
+ * `normal` are the viewer's explicit choice.
5451
+ *
5452
+ * Motion: `data-motion="reduce"` shortens every animation and transition to
5453
+ * 0.01ms instead of removing it. The end state still arrives and `animationend`
5454
+ * / `transitionend` still fire, so nothing that depends on them breaks and no
5455
+ * information is lost: a spinner's `role="status"` text, a disclosure's open
5456
+ * state and a toast's content are untouched. Scrolling is instant.
5457
+ * ========================================================================= */
5458
+
5459
+ :where(html[data-text-size="smallest"]) { font-size: 80%; }
5460
+ :where(html[data-text-size="smaller"]) { font-size: 90%; }
5461
+ :where(html[data-text-size="small"]) { font-size: 95%; }
5462
+ :where(html[data-text-size="normal"]) { font-size: 100%; }
5463
+ :where(html[data-text-size="large"]) { font-size: 110%; }
5464
+ :where(html[data-text-size="larger"]) { font-size: 125%; }
5465
+ :where(html[data-text-size="largest"]) { font-size: 150%; }
5466
+
5467
+ :where(html[data-motion="reduce"]) {
5468
+ scroll-behavior: auto;
5469
+ }
5470
+ :where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
5471
+ animation-duration: 0.01ms !important;
5472
+ animation-iteration-count: 1 !important;
5473
+ animation-delay: 0s !important;
5474
+ transition-duration: 0.01ms !important;
5475
+ transition-delay: 0s !important;
5476
+ scroll-behavior: auto !important;
5477
+ }
5478
+
5479
+ /* ============================================================================
5480
+ * Forced colours and contrast preference — shared verbatim by all themes.
5481
+ *
5482
+ * Forced colours (Windows High Contrast, `forced-colors: active`): the browser
5483
+ * replaces every colour with a system colour, which erases anything a control
5484
+ * told apart by background alone. These rules give such controls a border,
5485
+ * keep the focus ring, and mark selected and current items with `Highlight`
5486
+ * and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
5487
+ *
5488
+ * Contrast preference (`prefers-contrast: more`): a heavier border on controls
5489
+ * and a thicker focus ring. Colours are not changed here; a theme's colours are
5490
+ * its author's decision.
5491
+ * ========================================================================= */
5492
+
5493
+ @media (forced-colors: active) {
5494
+ :where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
5495
+ border: 1px solid ButtonBorder;
5496
+ }
5497
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
5498
+ outline: 3px solid Highlight;
5499
+ outline-offset: 2px;
5500
+ }
5501
+ :where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
5502
+ background: SelectedItem;
5503
+ color: SelectedItemText;
5504
+ forced-color-adjust: none;
5505
+ }
5506
+ :where([aria-current]:not([aria-current="false"])) {
5507
+ outline: 2px solid Highlight;
5508
+ outline-offset: -2px;
5509
+ }
5510
+ :where(:disabled, [aria-disabled="true"]) {
5511
+ border-color: GrayText;
5512
+ color: GrayText;
5513
+ }
5514
+ }
5515
+
5516
+ @media (prefers-contrast: more) {
5517
+ :where(button, input, select, textarea, [role="button"], [class$="-button"]) {
5518
+ border-width: 2px;
5519
+ border-style: solid;
5520
+ border-color: currentColor;
5521
+ }
5522
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
5523
+ outline-width: 3px;
5524
+ outline-offset: 2px;
5525
+ }
5526
+ }
5527
+
5528
+ /* ============================================================================
5529
+ * Writing systems — shared verbatim by all themes.
5530
+ *
5531
+ * A theme names its Latin font stack (`--lily-font-body-latin`). This section
5532
+ * builds `--lily-font-body` from it, with the system fonts of the element's
5533
+ * script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
5534
+ * Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
5535
+ * scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
5536
+ * Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
5537
+ * Chinese and Japanese but drawn differently, so the language picks the font,
5538
+ * not the script.
5539
+ *
5540
+ * `--lily-font-body` is re-declared on every element with a `lang`, so a
5541
+ * `<p lang="ja">` inside an English page gets Japanese fonts and a
5542
+ * `<span lang="en">` inside it gets none. A language not listed here keeps the
5543
+ * Latin stack, whose final generic family the browser resolves per language.
5544
+ *
5545
+ * `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
5546
+ * and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
5547
+ * Elements with a `lang` use it; the app's body text should too.
5548
+ *
5549
+ * To change a theme's font, set `--lily-font-body-latin`; to change a script's,
5550
+ * set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
5551
+ * itself still works on the element you set it on.
5552
+ * ========================================================================= */
5553
+
5554
+ :where(:root, [lang]) {
5555
+ --lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
5556
+ --lily-line-height-body: 1.5;
5557
+ }
5558
+
5559
+ :where([lang]) {
5560
+ --lily-font-script: initial;
5561
+ line-height: var(--lily-line-height-body);
5562
+ }
5563
+
5564
+ :where([lang|="zh"], [lang|="wuu"]) {
5565
+ --lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
5566
+ }
5567
+ :where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
5568
+ --lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
5569
+ }
5570
+ :where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
5571
+ --lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
5572
+ }
5573
+ :where([lang|="ja"]) {
5574
+ --lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
5575
+ }
5576
+ :where([lang|="ko"]) {
5577
+ --lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
5578
+ }
5579
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
5580
+ --lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
5581
+ }
5582
+ :where([lang|="ur"]) {
5583
+ --lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
5584
+ }
5585
+ :where([lang|="he"], [lang|="yi"]) {
5586
+ --lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
5587
+ }
5588
+ :where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
5589
+ --lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
5590
+ }
5591
+ :where([lang|="bn"], [lang|="as"]) {
5592
+ --lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
5593
+ }
5594
+ :where([lang|="gu"]) {
5595
+ --lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
5596
+ }
5597
+ :where([lang|="pa"]) {
5598
+ --lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
5599
+ }
5600
+ :where([lang|="kn"]) {
5601
+ --lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
5602
+ }
5603
+ :where([lang|="ta"]) {
5604
+ --lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
5605
+ }
5606
+ :where([lang|="te"]) {
5607
+ --lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
5608
+ }
5609
+ :where([lang|="th"]) {
5610
+ --lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
5611
+ }
5612
+ :where([lang|="lo"]) {
5613
+ --lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
5614
+ }
5615
+ :where([lang|="km"]) {
5616
+ --lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
5617
+ }
5618
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
5619
+ [lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
5620
+ [lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
5621
+ [lang|="lo"], [lang|="km"]) {
5622
+ --lily-line-height-body: 1.75;
5623
+ }