@lilydesignsystem/themes 0.6.0 → 0.6.1

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