@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
package/dist/black.css CHANGED
@@ -67,7 +67,7 @@
67
67
  green RAG status. */
68
68
  --color-success: oklch(51.98% 0.176 142.495);
69
69
  /* Foreground colour used over `--color-success` fills. */
70
- --color-success-content: oklch(90.39% 0.035 142.495);
70
+ --color-success-content: #ffffff;
71
71
  /* Warning colour — yellow/amber band; used on phase banners,
72
72
  in-progress states, validation warnings, and the amber RAG
73
73
  status. */
@@ -113,6 +113,14 @@
113
113
  want to layer a subtle texture; the baseline rules do not
114
114
  consume it. */
115
115
  --noise: 0;
116
+ /* Fluid inline gutter for page containers and the main
117
+ region: grows with the viewport from a 1rem floor to a 2rem
118
+ ceiling. Spacing only, never text. */
119
+ --space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
120
+ /* Fluid gap between sections (stacks and grids): grows with
121
+ the viewport from a 1rem floor to a 2rem ceiling. Spacing
122
+ only, never text. */
123
+ --space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
116
124
  }
117
125
 
118
126
  /* ----------------------------------------------------------------------------
@@ -211,7 +219,7 @@
211
219
  /* --- Typography ---------------------------------------------------- */
212
220
  /* Body font stack — system fonts first so consumers get a
213
221
  native-feeling baseline without shipping a web font. */
214
- --lily-font-body:
222
+ --lily-font-body-latin:
215
223
  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
216
224
  Arial, sans-serif;
217
225
  /* Monospaced font stack — used by code, kbd, identifiers, and
@@ -318,9 +326,12 @@
318
326
  }
319
327
 
320
328
  /* Invalid input — red border. The `aria-invalid="true"` attribute is the
321
- ARIA contract; pairing it with a colour change keeps WCAG 1.4.1
322
- (no colour-only meaning) honest because the ARIA state is also there. */
323
- :where([class$="-input"], .input)[aria-invalid="true"] {
329
+ ARIA contract (server-rendered errors); `:user-invalid` is the native
330
+ state that matches only after the user has interacted, so a required
331
+ field is not styled invalid on load. Pairing a colour change with the
332
+ ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
333
+ :where([class$="-input"], .input)[aria-invalid="true"],
334
+ :where([class$="-input"], .input):user-invalid {
324
335
  border-color: var(--color-error);
325
336
  }
326
337
 
@@ -1464,13 +1475,17 @@
1464
1475
  padding: 0.75rem 1rem;
1465
1476
  }
1466
1477
 
1467
- /* Sticky promo — sits at the very top of the viewport on scroll. */
1478
+ /* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
1479
+ the component's own bottom: 0 it would stretch over the whole page and take every click. */
1468
1480
  :where(.sticky-promo-banner) {
1469
1481
  position: sticky;
1470
- inset-block-start: 0;
1471
1482
  z-index: 10;
1472
1483
  }
1473
1484
 
1485
+ :where(.sticky-promo-banner:not([data-position="bottom"])) {
1486
+ inset-block-start: 0;
1487
+ }
1488
+
1474
1489
  /* Error message — inline form-validation message. */
1475
1490
  :where(.error-message) {
1476
1491
  color: var(--lily-error-text);
@@ -1550,7 +1565,7 @@
1550
1565
  display: block;
1551
1566
  width: 100%;
1552
1567
  margin-inline: auto;
1553
- padding-inline: 1rem;
1568
+ padding-inline: var(--space-fluid-gutter);
1554
1569
  box-sizing: border-box;
1555
1570
  }
1556
1571
  /* Fixed-width — caps at a comfortable reading width (~1152px). */
@@ -1570,11 +1585,11 @@
1570
1585
  :where(.flex-stack) {
1571
1586
  display: flex;
1572
1587
  flex-direction: column;
1573
- gap: 1rem;
1588
+ gap: var(--space-fluid-section);
1574
1589
  }
1575
1590
  :where(.grid) {
1576
1591
  display: grid;
1577
- gap: 1rem;
1592
+ gap: var(--space-fluid-section);
1578
1593
  }
1579
1594
  :where(.masonry) {
1580
1595
  column-count: 3;
@@ -1629,7 +1644,7 @@
1629
1644
  :where(.content-block) {
1630
1645
  max-width: var(--content-width-normal);
1631
1646
  margin-inline: auto;
1632
- padding-inline: 1rem;
1647
+ padding-inline: var(--space-fluid-gutter);
1633
1648
  box-sizing: border-box;
1634
1649
  }
1635
1650
  :where(.content-block[data-width="narrower"]) {
@@ -1647,7 +1662,8 @@
1647
1662
 
1648
1663
  /* --- Grail layout (5-region responsive page shell) --------------------- */
1649
1664
  /* Header spans the top; left-aside / main / right-aside fill the middle;
1650
- footer spans the bottom. At ≤768px the asides drop below the main. */
1665
+ footer spans the bottom. The collapse as the window narrows is in the shared
1666
+ container section at the end of this file. */
1651
1667
  :where(.grail-layout) {
1652
1668
  display: grid;
1653
1669
  min-height: 100vh;
@@ -1687,15 +1703,7 @@
1687
1703
  }
1688
1704
  /* Main content area — primary surface, more generous padding. */
1689
1705
  :where(.grail-layout-center-main) {
1690
- padding: 1.5rem;
1691
- }
1692
- /* Mobile breakpoint — collapse to a single column, stacking the regions. */
1693
- @media (max-width: 48rem) {
1694
- :where(.grail-layout) {
1695
- grid-template-areas: "header" "main" "left" "right" "footer";
1696
- grid-template-columns: 1fr;
1697
- grid-template-rows: auto auto auto auto auto;
1698
- }
1706
+ padding: var(--space-fluid-gutter);
1699
1707
  }
1700
1708
 
1701
1709
  /* Standalone semantic header / footer landmarks. */
@@ -1786,6 +1794,15 @@
1786
1794
  /* Drawers — side panels (right edge by default; RTL-aware via logical
1787
1795
  properties). Sit above the overlay container (z-index 101). */
1788
1796
  :where(.drawer, .slide-out-drawer, .sheet) {
1797
+ /* These are <dialog> elements opened with showModal() (P18-T6): undo the
1798
+ browser's centred-box defaults so the panel docks to the edge. */
1799
+ margin: 0;
1800
+ border: 0;
1801
+ inset-inline-start: auto;
1802
+ max-block-size: none;
1803
+ max-inline-size: none;
1804
+ block-size: 100%;
1805
+ box-sizing: border-box;
1789
1806
  position: fixed;
1790
1807
  inset-block: 0;
1791
1808
  inset-inline-end: 0;
@@ -1798,6 +1815,10 @@
1798
1815
  z-index: 101;
1799
1816
  }
1800
1817
 
1818
+ :where(.drawer, .slide-out-drawer, .sheet)::backdrop {
1819
+ background-color: color-mix(in oklch, black 50%, transparent);
1820
+ }
1821
+
1801
1822
  /* ==========================================================================
1802
1823
  * Menus
1803
1824
  * ====================================================================== */
@@ -1850,7 +1871,7 @@
1850
1871
  gap: 0.25rem;
1851
1872
  }
1852
1873
  /* Hamburger — bordered icon-button. */
1853
- :where(.hamburger-menu) {
1874
+ :where(.hamburger-menu > button) {
1854
1875
  display: inline-flex;
1855
1876
  align-items: center;
1856
1877
  justify-content: center;
@@ -2826,6 +2847,56 @@
2826
2847
  }
2827
2848
  }
2828
2849
 
2850
+ /* A closed popover stays closed. Author `display` beats the browser's own rule for a closed popover, so the
2851
+ menu rule above would otherwise leave every closed dropdown-menu and context-menu on the page. */
2852
+ :where([popover]:not(:popover-open)) {
2853
+ display: none;
2854
+ }
2855
+
2856
+ /* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
2857
+ browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
2858
+ where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
2859
+ open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
2860
+ hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
2861
+ `position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
2862
+ position-area: with no anchor, position-area does nothing and a static position can be off screen. */
2863
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
2864
+ display: none;
2865
+ }
2866
+
2867
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
2868
+ display: none;
2869
+ }
2870
+
2871
+ @supports (position-area: block-end) {
2872
+ :where(.cascader-trigger) { anchor-name: --lily-cascader; }
2873
+ :where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
2874
+ :where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
2875
+ :where(.combobox > input) { anchor-name: --lily-combobox; }
2876
+ :where(.cascader-panel) { position-anchor: --lily-cascader; }
2877
+ :where(.tree-select-panel) { position-anchor: --lily-tree-select; }
2878
+ :where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
2879
+ :where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
2880
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
2881
+ position: fixed;
2882
+ inset: auto;
2883
+ margin: 0;
2884
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
2885
+ width: max-content;
2886
+ max-width: calc(100vw - 1rem);
2887
+ }
2888
+ :where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
2889
+ inset-block-start: anchor(end, 25%);
2890
+ inset-inline-start: anchor(start, 25%);
2891
+ }
2892
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
2893
+ position-area: block-end span-inline-end;
2894
+ }
2895
+ :where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
2896
+ min-inline-size: anchor-size(inline);
2897
+ }
2898
+ }
2899
+
2829
2900
  :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
2830
2901
  > :where(
2831
2902
  .theme-picker-option,
@@ -3782,6 +3853,81 @@
3782
3853
  min-block-size: 24px;
3783
3854
  }
3784
3855
 
3856
+ /* ============================================================================
3857
+ * Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
3858
+ *
3859
+ * Where the primary pointer is coarse (a finger), interactive hooks are at least
3860
+ * 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
3861
+ * buttons, form fields, checkboxes and radios, and the link-shaped navigation
3862
+ * hooks. Links inside running text are exempt, so bare `a` is not listed. The
3863
+ * query is the capability, never a viewport width. :where() keeps specificity
3864
+ * at zero, so any consumer rule still wins.
3865
+ * ========================================================================= */
3866
+
3867
+ @media (pointer: coarse) {
3868
+ :where(button,
3869
+ [role="button"],
3870
+ [role="tab"],
3871
+ [role="option"],
3872
+ [role="menuitem"],
3873
+ [class*="-picker-button"],
3874
+ summary,
3875
+ input:not([type="hidden"]),
3876
+ select,
3877
+ textarea,
3878
+ .action-link,
3879
+ .back-link,
3880
+ .breadcrumb-list-item > a,
3881
+ .pagination-list-item > a,
3882
+ .contents-list-item > a,
3883
+ .section-list-item > a) {
3884
+ min-inline-size: 44px;
3885
+ min-block-size: 44px;
3886
+ }
3887
+ }
3888
+
3889
+ /* ============================================================================
3890
+ * Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
3891
+ *
3892
+ * --lily-brand is the identity's decorative colour: a header band, a rule, a
3893
+ * logo background. It is NEVER a text colour or a control's boundary, because a
3894
+ * brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
3895
+ * text drawn on it. By default they follow the theme's primary pair, which every
3896
+ * theme keeps readable; an adopter whose brand colour is lighter or darker sets
3897
+ * both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
3898
+ * content pairs (--color-base-content, --lily-error-text and so on).
3899
+ * ========================================================================== */
3900
+
3901
+ :where(:root) {
3902
+ --lily-brand: var(--color-primary);
3903
+ --lily-on-brand: var(--color-primary-content);
3904
+ }
3905
+
3906
+ /* ============================================================================
3907
+ * Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
3908
+ *
3909
+ * The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
3910
+ * adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
3911
+ * and no clear-space rule, because national and local guidelines disagree: a
3912
+ * theme or the adopter sets --lily-logo-clear-space (padding around the mark)
3913
+ * and --lily-logo-min-size (its smallest inline size). Both are unset by
3914
+ * default, so nothing changes until one is set.
3915
+ * ========================================================================== */
3916
+
3917
+ @layer lily {
3918
+ :where([data-lily-logo]) {
3919
+ display: inline-block;
3920
+ padding: var(--lily-logo-clear-space, 0);
3921
+ }
3922
+
3923
+ :where([data-lily-logo] > img, [data-lily-logo] > svg) {
3924
+ display: block;
3925
+ min-inline-size: var(--lily-logo-min-size, 0);
3926
+ max-inline-size: 100%;
3927
+ block-size: auto;
3928
+ }
3929
+ }
3930
+
3785
3931
  /* ============================================================================
3786
3932
  * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
3787
3933
  *
@@ -3810,6 +3956,140 @@
3810
3956
  overflow-wrap: anywhere;
3811
3957
  }
3812
3958
 
3959
+ /* ============================================================================
3960
+ * Scoped overflow — shared verbatim by all themes.
3961
+ *
3962
+ * Long unbroken strings (a national identifier, an email address, a URL) and
3963
+ * grid/flex tracks that refuse to shrink are the usual causes of horizontal
3964
+ * page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
3965
+ * `overflow-wrap: anywhere` on the places a long value lands (table cells are
3966
+ * covered by Overflow guards above), and `min-inline-size: 0` on the direct
3967
+ * children of Lily's grid and flex containers so a child can shrink below its
3968
+ * content. The identifier `-view` list below is the catalog's 70 national
3969
+ * identifier views (components-categories.tsv); bin/check-theme fails when it
3970
+ * drifts from the catalog. :where() keeps specificity at zero.
3971
+ * ========================================================================= */
3972
+
3973
+ :where(
3974
+ .alba-community-health-index-view,
3975
+ .australia-individual-healthcare-identifier-view,
3976
+ .belgique-numero-de-registre-national-view,
3977
+ .bulgaria-edinen-grazhdanski-nomer-view,
3978
+ .cesko-cestovni-pas-view,
3979
+ .cesko-rodne-cislo-view,
3980
+ .cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
3981
+ .kypros-national-passport-number-view,
3982
+ .danmark-personnummer-view,
3983
+ .deutschland-krankenversichertennummer-view,
3984
+ .eesti-isikukood-view,
3985
+ .ellada-dematerialised-securities-system-view,
3986
+ .england-national-health-service-number-view,
3987
+ .espana-codigo-de-identificacion-fiscal-view,
3988
+ .espana-tarjeta-sanitaria-individual-view,
3989
+ .france-numero-d-identification-au-repertoire-view,
3990
+ .hrvatska-osobni-identifikacijski-broj-view,
3991
+ .eire-individual-health-identifier-view,
3992
+ .island-kennitala-view,
3993
+ .italia-codice-fiscale-view,
3994
+ .latvija-personas-kods-view,
3995
+ .liechtenstein-national-identity-card-number-view,
3996
+ .liechtenstein-passport-number-view,
3997
+ .lietuva-asmens-kodas-view,
3998
+ .lietuva-pasas-view,
3999
+ .malta-national-identification-number-view,
4000
+ .malta-passport-number-view,
4001
+ .nederland-burgerservice-nummer-view,
4002
+ .nederland-identiteitskaart-nummer-view,
4003
+ .nederland-paspoort-nummer-view,
4004
+ .norge-fodselsnummer-view,
4005
+ .tuaisceart-eireann-health-and-care-number-view,
4006
+ .polska-numer-identyfikacji-podatkowej-view,
4007
+ .polska-pesel-view,
4008
+ .portugal-numero-de-identificacao-fiscal-view,
4009
+ .portugal-passaporte-view,
4010
+ .romania-cod-numeric-personal-view,
4011
+ .romania-pasaport-view,
4012
+ .slovenija-emso-view,
4013
+ .slovensko-pas-view,
4014
+ .slovensko-rodne-cislo-view,
4015
+ .suomi-henkilotunnus-view,
4016
+ .sverige-personnummer-view,
4017
+ .iban-view,
4018
+ .united-kingdom-national-health-service-number-view,
4019
+ .united-kingdom-national-insurance-number-view,
4020
+ .united-states-social-security-number-view,
4021
+ .aotearoa-national-health-index-view,
4022
+ .pilipinas-philhealth-identification-number-view,
4023
+ .brasil-cartao-nacional-de-saude-view,
4024
+ .schweiz-ahv-nummer-view,
4025
+ .canada-social-insurance-number-view,
4026
+ .hanguk-jumin-deungnok-beonho-view,
4027
+ .nihon-kojin-bango-view,
4028
+ .bharat-aadhaar-view,
4029
+ .yisrael-teudat-zehut-view,
4030
+ .south-africa-identity-number-view,
4031
+ .mexico-clave-unica-de-registro-de-poblacion-view,
4032
+ .singapore-national-registration-identity-card-view,
4033
+ .osterreich-sozialversicherungsnummer-view,
4034
+ .magyarorszag-taj-szam-view,
4035
+ .luxembourg-matricule-view,
4036
+ .zhongguo-jumin-shenfenzheng-haoma-view,
4037
+ .rossiya-snils-view,
4038
+ .turkiye-tc-kimlik-numarasi-view,
4039
+ .argentina-codigo-unico-de-identificacion-laboral-view,
4040
+ .ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
4041
+ .indonesia-nomor-induk-kependudukan-view,
4042
+ .prathet-thai-lek-prajam-tua-prachachon-view,
4043
+ .chile-rol-unico-nacional-view,
4044
+ .taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
4045
+ .hong-kong-identity-card-view,
4046
+ .iran-kod-e-melli-view,
4047
+ .as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
4048
+ .malaysia-kad-pengenalan-view,
4049
+ .viet-nam-can-cuoc-cong-dan-view,
4050
+ .pakistan-computerized-national-identity-card-view,
4051
+ .uruguay-cedula-de-identidad-view,
4052
+ .ecuador-cedula-de-identidad-view,
4053
+ .colombia-cedula-de-ciudadania-view,
4054
+ .australia-tax-file-number-view,
4055
+ .nigeria-national-identification-number-view,
4056
+ .misr-al-raqm-al-qawmi-view
4057
+ ) {
4058
+ overflow-wrap: anywhere;
4059
+ }
4060
+
4061
+ /* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
4062
+ :where(.summary-list, .summary-list-item, .description-list) {
4063
+ overflow-wrap: anywhere;
4064
+ }
4065
+
4066
+ :where(
4067
+ .grid,
4068
+ .flex-stack,
4069
+ .grail-layout,
4070
+ .summary-list,
4071
+ .summary-list-item,
4072
+ .description-list,
4073
+ .form,
4074
+ .editable-form,
4075
+ .field,
4076
+ .input-group,
4077
+ .button-group,
4078
+ .radio-group,
4079
+ .checkbox-group,
4080
+ .toggle-group,
4081
+ .tag-group,
4082
+ .split-view,
4083
+ .photo-pack,
4084
+ .data-filter-form,
4085
+ .action-bar,
4086
+ .tool-bar,
4087
+ .menu-bar,
4088
+ .tab-bar
4089
+ ) > :where(*) {
4090
+ min-inline-size: 0;
4091
+ }
4092
+
3813
4093
  /* ============================================================================
3814
4094
  * Helper packages — layout and look, shared verbatim by all themes.
3815
4095
  *
@@ -3937,6 +4217,8 @@
3937
4217
 
3938
4218
  :where(.gantt-table-td[data-in-range]) {
3939
4219
  background-color: var(--color-primary);
4220
+ /* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
4221
+ color: var(--color-primary-content);
3940
4222
  }
3941
4223
 
3942
4224
  :where(.gantt-table-td[data-in-range][data-milestone]) {
@@ -3959,3 +4241,334 @@
3959
4241
  :where(.time-zone-picker-option) {
3960
4242
  overflow-wrap: anywhere;
3961
4243
  }
4244
+
4245
+ /* ============================================================================
4246
+ * Overflow navigation — shared verbatim by all themes.
4247
+ *
4248
+ * The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
4249
+ * With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
4250
+ * (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
4251
+ * the links that do not fit into the More list. That list is in normal flow (position
4252
+ * static, never absolute), so opening it pushes the content below down and never covers it
4253
+ * (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
4254
+ * specificity at zero, so any consumer rule wins.
4255
+ * ========================================================================= */
4256
+
4257
+ :where(.navigation-menu-list) {
4258
+ display: flex;
4259
+ flex: 1 1 auto;
4260
+ flex-wrap: wrap;
4261
+ align-items: flex-start;
4262
+ gap: 0.25rem 0.5rem;
4263
+ min-inline-size: 0;
4264
+ margin: 0;
4265
+ padding: 0;
4266
+ list-style: none;
4267
+ }
4268
+
4269
+ :where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
4270
+ display: inline-block;
4271
+ min-inline-size: 24px;
4272
+ min-block-size: 24px;
4273
+ }
4274
+
4275
+ :where(.navigation-menu-more) {
4276
+ position: static;
4277
+ }
4278
+
4279
+ :where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
4280
+ display: none;
4281
+ }
4282
+
4283
+ :where(.navigation-menu-more-button) {
4284
+ min-inline-size: 24px;
4285
+ min-block-size: 24px;
4286
+ padding: 0.25rem 0.5rem;
4287
+ font: inherit;
4288
+ color: inherit;
4289
+ background: transparent;
4290
+ border: 1px solid currentcolor;
4291
+ cursor: pointer;
4292
+ }
4293
+
4294
+ :where(.navigation-menu-more-list) {
4295
+ position: static;
4296
+ margin: 0.25rem 0 0;
4297
+ padding: 0;
4298
+ list-style: none;
4299
+ }
4300
+
4301
+ /* ============================================================================
4302
+ * Container queries — shared verbatim by all themes.
4303
+ *
4304
+ * A component answers to the space it is given, not to the window: a summary
4305
+ * list in a narrow aside on a wide screen needs the narrow layout, which the
4306
+ * viewport query above cannot know. The three grail-layout regions are the
4307
+ * containers because their width comes from a grid track (`minmax(0, 1fr)`), so
4308
+ * inline-size containment cannot collapse them. `.card` is deliberately not a
4309
+ * container: in a shrink-to-fit parent (a flex row, an inline grid) containment
4310
+ * would collapse it to nothing. A component outside a grail region has no
4311
+ * container and keeps its wide layout. :where() keeps specificity at zero, so
4312
+ * any consumer rule wins.
4313
+ * ========================================================================= */
4314
+
4315
+ :where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
4316
+ container-type: inline-size;
4317
+ }
4318
+
4319
+ /* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
4320
+ window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
4321
+ Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
4322
+ (at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
4323
+ right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
4324
+ hidden, so all content stays reachable. */
4325
+ @media (max-width: 64rem) {
4326
+ :where(.grail-layout) {
4327
+ grid-template-areas:
4328
+ "header header"
4329
+ "left main"
4330
+ "right right"
4331
+ "footer footer";
4332
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
4333
+ grid-template-rows: auto auto auto auto;
4334
+ }
4335
+ }
4336
+
4337
+ @media (max-width: 48rem) {
4338
+ :where(.grail-layout) {
4339
+ grid-template-areas:
4340
+ "header"
4341
+ "left"
4342
+ "main"
4343
+ "right"
4344
+ "footer";
4345
+ grid-template-columns: minmax(0, 1fr);
4346
+ grid-template-rows: auto auto auto auto auto;
4347
+ }
4348
+ }
4349
+
4350
+ @container (max-width: 30rem) {
4351
+ :where(.summary-list) {
4352
+ grid-template-columns: minmax(0, 1fr);
4353
+ row-gap: 0.25rem;
4354
+ }
4355
+
4356
+ :where(.kanban-table-td) {
4357
+ min-width: 10rem;
4358
+ }
4359
+
4360
+ :where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
4361
+ padding-inline: 0.5rem;
4362
+ }
4363
+ }
4364
+
4365
+ /* ============================================================================
4366
+ * Focus not obscured — shared verbatim by all themes.
4367
+ *
4368
+ * WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
4369
+ * entirely hidden by author-created content, such as a bar fixed to the top or
4370
+ * bottom of the viewport. The browser scrolls a focused control into view, but
4371
+ * only as far as the edge of the viewport, which is where a fixed bar sits.
4372
+ * `scroll-padding` moves that edge in by the bar's height.
4373
+ *
4374
+ * Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
4375
+ * theme's or an app's own fixed header, a mobile bottom navigation) sets the
4376
+ * bar's height on the root element:
4377
+ *
4378
+ * --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
4379
+ * --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
4380
+ *
4381
+ * With both bars, set both. The defaults are 0px, so a page without a fixed bar
4382
+ * is unchanged. Specificity is zero (`:where`), so an app's own
4383
+ * `scroll-padding` wins.
4384
+ * ========================================================================= */
4385
+
4386
+ :where(html) {
4387
+ scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
4388
+ }
4389
+
4390
+ /* ============================================================================
4391
+ * Text size and motion preferences — shared verbatim by all themes.
4392
+ *
4393
+ * The text-size-picker sets `data-text-size` on the root and the motion-picker
4394
+ * sets `data-motion`; neither styles anything itself. These rules are what make
4395
+ * the choice visible.
4396
+ *
4397
+ * Text size: the seven steps scale the root font size, and every theme sizes in
4398
+ * `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
4399
+ * own browser setting), and the scale is percentages of that, never pixels, so
4400
+ * a viewer who raised their browser font size keeps it. The steps below
4401
+ * `normal` are the viewer's explicit choice.
4402
+ *
4403
+ * Motion: `data-motion="reduce"` shortens every animation and transition to
4404
+ * 0.01ms instead of removing it. The end state still arrives and `animationend`
4405
+ * / `transitionend` still fire, so nothing that depends on them breaks and no
4406
+ * information is lost: a spinner's `role="status"` text, a disclosure's open
4407
+ * state and a toast's content are untouched. Scrolling is instant.
4408
+ * ========================================================================= */
4409
+
4410
+ :where(html[data-text-size="smallest"]) { font-size: 80%; }
4411
+ :where(html[data-text-size="smaller"]) { font-size: 90%; }
4412
+ :where(html[data-text-size="small"]) { font-size: 95%; }
4413
+ :where(html[data-text-size="normal"]) { font-size: 100%; }
4414
+ :where(html[data-text-size="large"]) { font-size: 110%; }
4415
+ :where(html[data-text-size="larger"]) { font-size: 125%; }
4416
+ :where(html[data-text-size="largest"]) { font-size: 150%; }
4417
+
4418
+ :where(html[data-motion="reduce"]) {
4419
+ scroll-behavior: auto;
4420
+ }
4421
+ :where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
4422
+ animation-duration: 0.01ms !important;
4423
+ animation-iteration-count: 1 !important;
4424
+ animation-delay: 0s !important;
4425
+ transition-duration: 0.01ms !important;
4426
+ transition-delay: 0s !important;
4427
+ scroll-behavior: auto !important;
4428
+ }
4429
+
4430
+ /* ============================================================================
4431
+ * Forced colours and contrast preference — shared verbatim by all themes.
4432
+ *
4433
+ * Forced colours (Windows High Contrast, `forced-colors: active`): the browser
4434
+ * replaces every colour with a system colour, which erases anything a control
4435
+ * told apart by background alone. These rules give such controls a border,
4436
+ * keep the focus ring, and mark selected and current items with `Highlight`
4437
+ * and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
4438
+ *
4439
+ * Contrast preference (`prefers-contrast: more`): a heavier border on controls
4440
+ * and a thicker focus ring. Colours are not changed here; a theme's colours are
4441
+ * its author's decision.
4442
+ * ========================================================================= */
4443
+
4444
+ @media (forced-colors: active) {
4445
+ :where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
4446
+ border: 1px solid ButtonBorder;
4447
+ }
4448
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4449
+ outline: 3px solid Highlight;
4450
+ outline-offset: 2px;
4451
+ }
4452
+ :where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
4453
+ background: SelectedItem;
4454
+ color: SelectedItemText;
4455
+ forced-color-adjust: none;
4456
+ }
4457
+ :where([aria-current]:not([aria-current="false"])) {
4458
+ outline: 2px solid Highlight;
4459
+ outline-offset: -2px;
4460
+ }
4461
+ :where(:disabled, [aria-disabled="true"]) {
4462
+ border-color: GrayText;
4463
+ color: GrayText;
4464
+ }
4465
+ }
4466
+
4467
+ @media (prefers-contrast: more) {
4468
+ :where(button, input, select, textarea, [role="button"], [class$="-button"]) {
4469
+ border-width: 2px;
4470
+ border-style: solid;
4471
+ border-color: currentColor;
4472
+ }
4473
+ :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
4474
+ outline-width: 3px;
4475
+ outline-offset: 2px;
4476
+ }
4477
+ }
4478
+
4479
+ /* ============================================================================
4480
+ * Writing systems — shared verbatim by all themes.
4481
+ *
4482
+ * A theme names its Latin font stack (`--lily-font-body-latin`). This section
4483
+ * builds `--lily-font-body` from it, with the system fonts of the element's
4484
+ * script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
4485
+ * Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
4486
+ * scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
4487
+ * Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
4488
+ * Chinese and Japanese but drawn differently, so the language picks the font,
4489
+ * not the script.
4490
+ *
4491
+ * `--lily-font-body` is re-declared on every element with a `lang`, so a
4492
+ * `<p lang="ja">` inside an English page gets Japanese fonts and a
4493
+ * `<span lang="en">` inside it gets none. A language not listed here keeps the
4494
+ * Latin stack, whose final generic family the browser resolves per language.
4495
+ *
4496
+ * `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
4497
+ * and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
4498
+ * Elements with a `lang` use it; the app's body text should too.
4499
+ *
4500
+ * To change a theme's font, set `--lily-font-body-latin`; to change a script's,
4501
+ * set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
4502
+ * itself still works on the element you set it on.
4503
+ * ========================================================================= */
4504
+
4505
+ :where(:root, [lang]) {
4506
+ --lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
4507
+ --lily-line-height-body: 1.5;
4508
+ }
4509
+
4510
+ :where([lang]) {
4511
+ --lily-font-script: initial;
4512
+ line-height: var(--lily-line-height-body);
4513
+ }
4514
+
4515
+ :where([lang|="zh"], [lang|="wuu"]) {
4516
+ --lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
4517
+ }
4518
+ :where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
4519
+ --lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
4520
+ }
4521
+ :where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
4522
+ --lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
4523
+ }
4524
+ :where([lang|="ja"]) {
4525
+ --lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
4526
+ }
4527
+ :where([lang|="ko"]) {
4528
+ --lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
4529
+ }
4530
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
4531
+ --lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
4532
+ }
4533
+ :where([lang|="ur"]) {
4534
+ --lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
4535
+ }
4536
+ :where([lang|="he"], [lang|="yi"]) {
4537
+ --lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
4538
+ }
4539
+ :where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
4540
+ --lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
4541
+ }
4542
+ :where([lang|="bn"], [lang|="as"]) {
4543
+ --lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
4544
+ }
4545
+ :where([lang|="gu"]) {
4546
+ --lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
4547
+ }
4548
+ :where([lang|="pa"]) {
4549
+ --lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
4550
+ }
4551
+ :where([lang|="kn"]) {
4552
+ --lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
4553
+ }
4554
+ :where([lang|="ta"]) {
4555
+ --lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
4556
+ }
4557
+ :where([lang|="te"]) {
4558
+ --lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
4559
+ }
4560
+ :where([lang|="th"]) {
4561
+ --lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
4562
+ }
4563
+ :where([lang|="lo"]) {
4564
+ --lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
4565
+ }
4566
+ :where([lang|="km"]) {
4567
+ --lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
4568
+ }
4569
+ :where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
4570
+ [lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
4571
+ [lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
4572
+ [lang|="lo"], [lang|="km"]) {
4573
+ --lily-line-height-body: 1.75;
4574
+ }