@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.
- package/LICENSE.md +8 -8
- package/dist/abyss.css +629 -22
- package/dist/acid.css +628 -21
- package/dist/adobe-spectrum.css +630 -23
- package/dist/ant-design.css +628 -21
- package/dist/aqua.css +630 -23
- package/dist/atlassian.css +628 -21
- package/dist/australia-agriculture-design-system.css +4569 -0
- package/dist/autumn.css +630 -23
- package/dist/black.css +629 -22
- package/dist/brazil-padrao-digital-de-governo.css +4569 -0
- package/dist/bumblebee.css +631 -24
- package/dist/business.css +629 -22
- package/dist/canada-government-of-canada-design-system.css +4569 -0
- package/dist/cappuccino.css +628 -21
- package/dist/caramellatte.css +629 -22
- package/dist/cmyk.css +628 -21
- package/dist/coffee.css +628 -21
- package/dist/corporate.css +632 -25
- package/dist/cupcake.css +629 -22
- package/dist/cyberpunk.css +628 -21
- package/dist/dark.css +630 -23
- package/dist/dim.css +628 -21
- package/dist/dracula.css +628 -21
- package/dist/emerald.css +629 -22
- package/dist/european-union-europa-component-library.css +4569 -0
- package/dist/excel.css +628 -21
- package/dist/fantasy.css +629 -22
- package/dist/fluent.css +628 -21
- package/dist/forest.css +628 -21
- package/dist/garden.css +630 -23
- package/dist/github-primer.css +628 -21
- package/dist/halloween.css +629 -22
- package/dist/ibm-carbon.css +628 -21
- package/dist/japan-digital-agency-design-system.css +4569 -0
- package/dist/lemonade.css +628 -21
- package/dist/light.css +629 -22
- package/dist/linear.css +628 -21
- package/dist/lofi.css +628 -21
- package/dist/luxury.css +628 -21
- package/dist/mozilla-protocol.css +630 -23
- package/dist/night.css +628 -21
- package/dist/nord.css +628 -21
- package/dist/notion.css +628 -21
- package/dist/pastel.css +635 -28
- package/dist/retro.css +632 -25
- package/dist/salesforce.css +628 -21
- package/dist/sap-fiori.css +628 -21
- package/dist/silk.css +629 -22
- package/dist/singapore-government-design-system.css +4569 -0
- package/dist/sunset.css +628 -21
- package/dist/synthwave.css +628 -21
- package/dist/united-kingdom-government-digital-service.css +628 -21
- package/dist/united-kingdom-national-health-service-england-for-patients.css +652 -32
- package/dist/united-kingdom-national-health-service-england-for-practitioners.css +650 -30
- package/dist/united-kingdom-national-health-service-scotland-for-patients.css +663 -40
- package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +658 -35
- package/dist/united-kingdom-national-health-service-wales-for-patients.css +663 -38
- package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +656 -31
- package/dist/united-states-web-design-system.css +629 -22
- package/dist/valentine.css +632 -25
- package/dist/vercel.css +628 -21
- package/dist/winter.css +629 -22
- package/dist/wireframe.css +628 -21
- package/index.md +8 -4
- package/package.json +2 -2
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
* more clinical reading of the same palette with magenta/violet
|
|
19
19
|
* callouts reserved for safety messaging.
|
|
20
20
|
*
|
|
21
|
-
* Upstream tracked:
|
|
22
|
-
*
|
|
21
|
+
* Upstream tracked: nhsuk-frontend 10.7.1 (npm, published 2026-10-29;
|
|
22
|
+
* re-baselined from 9.x on 2026-10-29 against the package's Sass
|
|
23
|
+
* settings and CHANGELOG; v10 has been stable since 10.0.0 on
|
|
24
|
+
* 2025-08-26). Independent
|
|
23
25
|
* implementation against Lily class hooks; not affiliated with or
|
|
24
26
|
* endorsed by the NHS.
|
|
25
27
|
*
|
|
@@ -37,10 +39,15 @@
|
|
|
37
39
|
* https://www.gov.scot/publications/digital-scotland-service-standard/
|
|
38
40
|
* - Typography: Frutiger W01 (primary, shared with NHS UK), Roboto for
|
|
39
41
|
* NHS Inform body copy, Arial / system-ui as the universal fallback.
|
|
40
|
-
* - Base font size: 16px;
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* - Base font size: 16px; type scale follows nhsuk-frontend 10 (tablet
|
|
43
|
+
* px 14/16/19/22/26/36/48/64; point 24 was removed in 10.0.0) so
|
|
44
|
+
* components ported from the NHS UK frontend "just work".
|
|
45
|
+
* - Spacing: nhsuk-frontend 10 spacing points (px) are 0, 4, 8, 16, 24,
|
|
46
|
+
* 32, 40, 48, 56, 64 (`$nhsuk-spacing-points`, unchanged from 9.x).
|
|
47
|
+
* - Scotland: no NHS Scotland or NHS Inform frontend package is
|
|
48
|
+
* published (npm search, 2026-10-29), so this theme takes
|
|
49
|
+
* nhsuk-frontend plus the Scottish palette below, which keeps its own
|
|
50
|
+
* values.
|
|
44
51
|
* - WCAG 2.2 AA mandated by the Digital Scotland Service Standard;
|
|
45
52
|
* Lily targets AAA. The focus indicator below clears AAA at 3:1
|
|
46
53
|
* against every surface in the theme.
|
|
@@ -84,7 +91,10 @@
|
|
|
84
91
|
* NHS Emergency Red #DA291C error / destructive action, also
|
|
85
92
|
* the colour used on the "999" badge
|
|
86
93
|
* inside NHS Inform.
|
|
87
|
-
* NHS Green
|
|
94
|
+
* NHS.UK Green #007F3B success / confirmation (nhsuk-frontend
|
|
95
|
+
* 10 `$nhsuk-success-colour`; was NHS
|
|
96
|
+
* Identity green #009639 until
|
|
97
|
+
* 2026-10-29).
|
|
88
98
|
* NHS Dark Green #006747 success hover / pressed state.
|
|
89
99
|
*
|
|
90
100
|
* Geometry rules (shared with NHS UK frontend)
|
|
@@ -198,13 +208,17 @@
|
|
|
198
208
|
--color-info: oklch(54% 0.17 247);
|
|
199
209
|
--color-info-content: oklch(100% 0 0);
|
|
200
210
|
/* ---- Success (NHS Green)
|
|
201
|
-
-------------------------------------------- */ /* NHS
|
|
202
|
-
|
|
203
|
-
indicators */ /* ("you have been booked"), and the
|
|
204
|
-
state on form summaries. */ /* Identical role and
|
|
205
|
-
target as the NHS UK system so shared */ /*
|
|
206
|
-
carry the same meaning across the border.
|
|
207
|
-
|
|
211
|
+
-------------------------------------------- */ /* NHS.UK
|
|
212
|
+
frontend green #007F3B — confirmation panels, completed-
|
|
213
|
+
step indicators */ /* ("you have been booked"), and the
|
|
214
|
+
success state on form summaries. */ /* Identical role and
|
|
215
|
+
contrast target as the NHS UK system so shared */ /*
|
|
216
|
+
components carry the same meaning across the border. Re-
|
|
217
|
+
baselined 2026-10-29 to nhsuk-frontend 10.7.1 `$nhsuk-
|
|
218
|
+
success-colour` (core/settings/_colours-applied.scss, new
|
|
219
|
+
in v10); it was NHS Identity green #009639, which gave
|
|
220
|
+
white content 4.37:1 (below AA). Now 5.19:1. */
|
|
221
|
+
--color-success: oklch(52% 0.14 151);
|
|
208
222
|
--color-success-content: oklch(100% 0 0);
|
|
209
223
|
/* ---- Warning (NHS Warm Yellow)
|
|
210
224
|
-------------------------------------- */ /* NHS Warm
|
|
@@ -244,11 +258,13 @@
|
|
|
244
258
|
/* Inner padding hints for selectors and fields (Lily sizing). */
|
|
245
259
|
--size-selector: 0.25rem;
|
|
246
260
|
--size-field: 0.25rem;
|
|
247
|
-
/* Border width: 1px hairline,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
261
|
+
/* Border width: 1px hairline, Lily's own hairline, not an
|
|
262
|
+
upstream value: nhsuk-frontend 10 has no `$nhsuk-border-
|
|
263
|
+
width-form`; its form controls use `$nhsuk-border-width-
|
|
264
|
+
form-element` (2px). */ /* NHS Scotland's primary buttons
|
|
265
|
+
use a 4px bottom shadow border in */ /* their own
|
|
266
|
+
implementation; that is left to example-app CSS so the */
|
|
267
|
+
/* Lily token stays the universal 1px hairline. */
|
|
252
268
|
--border: 1px;
|
|
253
269
|
/* Depth & noise off — NHS Scotland identity guidance, like
|
|
254
270
|
NHS UK, */ /* avoids shadows, gradients, and textures so
|
|
@@ -257,6 +273,14 @@
|
|
|
257
273
|
settings. */
|
|
258
274
|
--depth: 0;
|
|
259
275
|
--noise: 0;
|
|
276
|
+
/* Fluid inline gutter for page containers and the main
|
|
277
|
+
region: grows with the viewport from a 1rem floor to a 2rem
|
|
278
|
+
ceiling. Spacing only, never text. */
|
|
279
|
+
--space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
|
|
280
|
+
/* Fluid gap between sections (stacks and grids): grows with
|
|
281
|
+
the viewport from a 1rem floor to a 2rem ceiling. Spacing
|
|
282
|
+
only, never text. */
|
|
283
|
+
--space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
|
|
260
284
|
}
|
|
261
285
|
|
|
262
286
|
/* ----------------------------------------------------------------------------
|
|
@@ -355,7 +379,7 @@
|
|
|
355
379
|
/* --- Typography ---------------------------------------------------- */
|
|
356
380
|
/* Body font stack — system fonts first so consumers get a
|
|
357
381
|
native-feeling baseline without shipping a web font. */
|
|
358
|
-
--lily-font-body:
|
|
382
|
+
--lily-font-body-latin:
|
|
359
383
|
system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
360
384
|
Arial, sans-serif;
|
|
361
385
|
/* Monospaced font stack — used by code, kbd, identifiers, and
|
|
@@ -462,9 +486,12 @@
|
|
|
462
486
|
}
|
|
463
487
|
|
|
464
488
|
/* Invalid input — red border. The `aria-invalid="true"` attribute is the
|
|
465
|
-
ARIA contract
|
|
466
|
-
|
|
467
|
-
|
|
489
|
+
ARIA contract (server-rendered errors); `:user-invalid` is the native
|
|
490
|
+
state that matches only after the user has interacted, so a required
|
|
491
|
+
field is not styled invalid on load. Pairing a colour change with the
|
|
492
|
+
ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
|
|
493
|
+
:where([class$="-input"], .input)[aria-invalid="true"],
|
|
494
|
+
:where([class$="-input"], .input):user-invalid {
|
|
468
495
|
border-color: var(--color-error);
|
|
469
496
|
}
|
|
470
497
|
|
|
@@ -1608,13 +1635,17 @@
|
|
|
1608
1635
|
padding: 0.75rem 1rem;
|
|
1609
1636
|
}
|
|
1610
1637
|
|
|
1611
|
-
/* Sticky promo —
|
|
1638
|
+
/* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
|
|
1639
|
+
the component's own bottom: 0 it would stretch over the whole page and take every click. */
|
|
1612
1640
|
:where(.sticky-promo-banner) {
|
|
1613
1641
|
position: sticky;
|
|
1614
|
-
inset-block-start: 0;
|
|
1615
1642
|
z-index: 10;
|
|
1616
1643
|
}
|
|
1617
1644
|
|
|
1645
|
+
:where(.sticky-promo-banner:not([data-position="bottom"])) {
|
|
1646
|
+
inset-block-start: 0;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1618
1649
|
/* Error message — inline form-validation message. */
|
|
1619
1650
|
:where(.error-message) {
|
|
1620
1651
|
color: var(--lily-error-text);
|
|
@@ -1694,7 +1725,7 @@
|
|
|
1694
1725
|
display: block;
|
|
1695
1726
|
width: 100%;
|
|
1696
1727
|
margin-inline: auto;
|
|
1697
|
-
padding-inline:
|
|
1728
|
+
padding-inline: var(--space-fluid-gutter);
|
|
1698
1729
|
box-sizing: border-box;
|
|
1699
1730
|
}
|
|
1700
1731
|
/* Fixed-width — caps at a comfortable reading width (~1152px). */
|
|
@@ -1714,11 +1745,11 @@
|
|
|
1714
1745
|
:where(.flex-stack) {
|
|
1715
1746
|
display: flex;
|
|
1716
1747
|
flex-direction: column;
|
|
1717
|
-
gap:
|
|
1748
|
+
gap: var(--space-fluid-section);
|
|
1718
1749
|
}
|
|
1719
1750
|
:where(.grid) {
|
|
1720
1751
|
display: grid;
|
|
1721
|
-
gap:
|
|
1752
|
+
gap: var(--space-fluid-section);
|
|
1722
1753
|
}
|
|
1723
1754
|
:where(.masonry) {
|
|
1724
1755
|
column-count: 3;
|
|
@@ -1773,7 +1804,7 @@
|
|
|
1773
1804
|
:where(.content-block) {
|
|
1774
1805
|
max-width: var(--content-width-normal);
|
|
1775
1806
|
margin-inline: auto;
|
|
1776
|
-
padding-inline:
|
|
1807
|
+
padding-inline: var(--space-fluid-gutter);
|
|
1777
1808
|
box-sizing: border-box;
|
|
1778
1809
|
}
|
|
1779
1810
|
:where(.content-block[data-width="narrower"]) {
|
|
@@ -1791,7 +1822,8 @@
|
|
|
1791
1822
|
|
|
1792
1823
|
/* --- Grail layout (5-region responsive page shell) --------------------- */
|
|
1793
1824
|
/* Header spans the top; left-aside / main / right-aside fill the middle;
|
|
1794
|
-
footer spans the bottom.
|
|
1825
|
+
footer spans the bottom. The collapse as the window narrows is in the shared
|
|
1826
|
+
container section at the end of this file. */
|
|
1795
1827
|
:where(.grail-layout) {
|
|
1796
1828
|
display: grid;
|
|
1797
1829
|
min-height: 100vh;
|
|
@@ -1831,15 +1863,7 @@
|
|
|
1831
1863
|
}
|
|
1832
1864
|
/* Main content area — primary surface, more generous padding. */
|
|
1833
1865
|
:where(.grail-layout-center-main) {
|
|
1834
|
-
padding:
|
|
1835
|
-
}
|
|
1836
|
-
/* Mobile breakpoint — collapse to a single column, stacking the regions. */
|
|
1837
|
-
@media (max-width: 48rem) {
|
|
1838
|
-
:where(.grail-layout) {
|
|
1839
|
-
grid-template-areas: "header" "main" "left" "right" "footer";
|
|
1840
|
-
grid-template-columns: 1fr;
|
|
1841
|
-
grid-template-rows: auto auto auto auto auto;
|
|
1842
|
-
}
|
|
1866
|
+
padding: var(--space-fluid-gutter);
|
|
1843
1867
|
}
|
|
1844
1868
|
|
|
1845
1869
|
/* Standalone semantic header / footer landmarks. */
|
|
@@ -1930,6 +1954,15 @@
|
|
|
1930
1954
|
/* Drawers — side panels (right edge by default; RTL-aware via logical
|
|
1931
1955
|
properties). Sit above the overlay container (z-index 101). */
|
|
1932
1956
|
:where(.drawer, .slide-out-drawer, .sheet) {
|
|
1957
|
+
/* These are <dialog> elements opened with showModal() (P18-T6): undo the
|
|
1958
|
+
browser's centred-box defaults so the panel docks to the edge. */
|
|
1959
|
+
margin: 0;
|
|
1960
|
+
border: 0;
|
|
1961
|
+
inset-inline-start: auto;
|
|
1962
|
+
max-block-size: none;
|
|
1963
|
+
max-inline-size: none;
|
|
1964
|
+
block-size: 100%;
|
|
1965
|
+
box-sizing: border-box;
|
|
1933
1966
|
position: fixed;
|
|
1934
1967
|
inset-block: 0;
|
|
1935
1968
|
inset-inline-end: 0;
|
|
@@ -1942,6 +1975,10 @@
|
|
|
1942
1975
|
z-index: 101;
|
|
1943
1976
|
}
|
|
1944
1977
|
|
|
1978
|
+
:where(.drawer, .slide-out-drawer, .sheet)::backdrop {
|
|
1979
|
+
background-color: color-mix(in oklch, black 50%, transparent);
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1945
1982
|
/* ==========================================================================
|
|
1946
1983
|
* Menus
|
|
1947
1984
|
* ====================================================================== */
|
|
@@ -1994,7 +2031,7 @@
|
|
|
1994
2031
|
gap: 0.25rem;
|
|
1995
2032
|
}
|
|
1996
2033
|
/* Hamburger — bordered icon-button. */
|
|
1997
|
-
:where(.hamburger-menu) {
|
|
2034
|
+
:where(.hamburger-menu > button) {
|
|
1998
2035
|
display: inline-flex;
|
|
1999
2036
|
align-items: center;
|
|
2000
2037
|
justify-content: center;
|
|
@@ -2970,6 +3007,50 @@
|
|
|
2970
3007
|
}
|
|
2971
3008
|
}
|
|
2972
3009
|
|
|
3010
|
+
/* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
|
|
3011
|
+
browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
|
|
3012
|
+
where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
|
|
3013
|
+
open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
|
|
3014
|
+
hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
|
|
3015
|
+
`position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
|
|
3016
|
+
position-area: with no anchor, position-area does nothing and a static position can be off screen. */
|
|
3017
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
|
|
3018
|
+
display: none;
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
|
|
3022
|
+
display: none;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
@supports (position-area: block-end) {
|
|
3026
|
+
:where(.cascader-trigger) { anchor-name: --lily-cascader; }
|
|
3027
|
+
:where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
|
|
3028
|
+
:where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
|
|
3029
|
+
:where(.combobox > input) { anchor-name: --lily-combobox; }
|
|
3030
|
+
:where(.cascader-panel) { position-anchor: --lily-cascader; }
|
|
3031
|
+
:where(.tree-select-panel) { position-anchor: --lily-tree-select; }
|
|
3032
|
+
:where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
|
|
3033
|
+
:where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
|
|
3034
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
|
|
3035
|
+
position: fixed;
|
|
3036
|
+
inset: auto;
|
|
3037
|
+
margin: 0;
|
|
3038
|
+
position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
|
|
3039
|
+
width: max-content;
|
|
3040
|
+
max-width: calc(100vw - 1rem);
|
|
3041
|
+
}
|
|
3042
|
+
:where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
|
|
3043
|
+
inset-block-start: anchor(end, 25%);
|
|
3044
|
+
inset-inline-start: anchor(start, 25%);
|
|
3045
|
+
}
|
|
3046
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
|
|
3047
|
+
position-area: block-end span-inline-end;
|
|
3048
|
+
}
|
|
3049
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
|
|
3050
|
+
min-inline-size: anchor-size(inline);
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
|
|
2973
3054
|
:where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
|
|
2974
3055
|
> :where(
|
|
2975
3056
|
.theme-picker-option,
|
|
@@ -3926,6 +4007,81 @@
|
|
|
3926
4007
|
min-block-size: 24px;
|
|
3927
4008
|
}
|
|
3928
4009
|
|
|
4010
|
+
/* ============================================================================
|
|
4011
|
+
* Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
|
|
4012
|
+
*
|
|
4013
|
+
* Where the primary pointer is coarse (a finger), interactive hooks are at least
|
|
4014
|
+
* 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
|
|
4015
|
+
* buttons, form fields, checkboxes and radios, and the link-shaped navigation
|
|
4016
|
+
* hooks. Links inside running text are exempt, so bare `a` is not listed. The
|
|
4017
|
+
* query is the capability, never a viewport width. :where() keeps specificity
|
|
4018
|
+
* at zero, so any consumer rule still wins.
|
|
4019
|
+
* ========================================================================= */
|
|
4020
|
+
|
|
4021
|
+
@media (pointer: coarse) {
|
|
4022
|
+
:where(button,
|
|
4023
|
+
[role="button"],
|
|
4024
|
+
[role="tab"],
|
|
4025
|
+
[role="option"],
|
|
4026
|
+
[role="menuitem"],
|
|
4027
|
+
[class*="-picker-button"],
|
|
4028
|
+
summary,
|
|
4029
|
+
input:not([type="hidden"]),
|
|
4030
|
+
select,
|
|
4031
|
+
textarea,
|
|
4032
|
+
.action-link,
|
|
4033
|
+
.back-link,
|
|
4034
|
+
.breadcrumb-list-item > a,
|
|
4035
|
+
.pagination-list-item > a,
|
|
4036
|
+
.contents-list-item > a,
|
|
4037
|
+
.section-list-item > a) {
|
|
4038
|
+
min-inline-size: 44px;
|
|
4039
|
+
min-block-size: 44px;
|
|
4040
|
+
}
|
|
4041
|
+
}
|
|
4042
|
+
|
|
4043
|
+
/* ============================================================================
|
|
4044
|
+
* Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
|
|
4045
|
+
*
|
|
4046
|
+
* --lily-brand is the identity's decorative colour: a header band, a rule, a
|
|
4047
|
+
* logo background. It is NEVER a text colour or a control's boundary, because a
|
|
4048
|
+
* brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
|
|
4049
|
+
* text drawn on it. By default they follow the theme's primary pair, which every
|
|
4050
|
+
* theme keeps readable; an adopter whose brand colour is lighter or darker sets
|
|
4051
|
+
* both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
|
|
4052
|
+
* content pairs (--color-base-content, --lily-error-text and so on).
|
|
4053
|
+
* ========================================================================== */
|
|
4054
|
+
|
|
4055
|
+
:where(:root) {
|
|
4056
|
+
--lily-brand: var(--color-primary);
|
|
4057
|
+
--lily-on-brand: var(--color-primary-content);
|
|
4058
|
+
}
|
|
4059
|
+
|
|
4060
|
+
/* ============================================================================
|
|
4061
|
+
* Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
|
|
4062
|
+
*
|
|
4063
|
+
* The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
|
|
4064
|
+
* adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
|
|
4065
|
+
* and no clear-space rule, because national and local guidelines disagree: a
|
|
4066
|
+
* theme or the adopter sets --lily-logo-clear-space (padding around the mark)
|
|
4067
|
+
* and --lily-logo-min-size (its smallest inline size). Both are unset by
|
|
4068
|
+
* default, so nothing changes until one is set.
|
|
4069
|
+
* ========================================================================== */
|
|
4070
|
+
|
|
4071
|
+
@layer lily {
|
|
4072
|
+
:where([data-lily-logo]) {
|
|
4073
|
+
display: inline-block;
|
|
4074
|
+
padding: var(--lily-logo-clear-space, 0);
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
:where([data-lily-logo] > img, [data-lily-logo] > svg) {
|
|
4078
|
+
display: block;
|
|
4079
|
+
min-inline-size: var(--lily-logo-min-size, 0);
|
|
4080
|
+
max-inline-size: 100%;
|
|
4081
|
+
block-size: auto;
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
|
|
3929
4085
|
/* ============================================================================
|
|
3930
4086
|
* Overflow guards — narrow-viewport safety, shared verbatim by all themes.
|
|
3931
4087
|
*
|
|
@@ -3954,6 +4110,140 @@
|
|
|
3954
4110
|
overflow-wrap: anywhere;
|
|
3955
4111
|
}
|
|
3956
4112
|
|
|
4113
|
+
/* ============================================================================
|
|
4114
|
+
* Scoped overflow — shared verbatim by all themes.
|
|
4115
|
+
*
|
|
4116
|
+
* Long unbroken strings (a national identifier, an email address, a URL) and
|
|
4117
|
+
* grid/flex tracks that refuse to shrink are the usual causes of horizontal
|
|
4118
|
+
* page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
|
|
4119
|
+
* `overflow-wrap: anywhere` on the places a long value lands (table cells are
|
|
4120
|
+
* covered by Overflow guards above), and `min-inline-size: 0` on the direct
|
|
4121
|
+
* children of Lily's grid and flex containers so a child can shrink below its
|
|
4122
|
+
* content. The identifier `-view` list below is the catalog's 70 national
|
|
4123
|
+
* identifier views (components-categories.tsv); bin/check-theme fails when it
|
|
4124
|
+
* drifts from the catalog. :where() keeps specificity at zero.
|
|
4125
|
+
* ========================================================================= */
|
|
4126
|
+
|
|
4127
|
+
:where(
|
|
4128
|
+
.alba-community-health-index-view,
|
|
4129
|
+
.australia-individual-healthcare-identifier-view,
|
|
4130
|
+
.belgique-numero-de-registre-national-view,
|
|
4131
|
+
.bulgaria-edinen-grazhdanski-nomer-view,
|
|
4132
|
+
.cesko-cestovni-pas-view,
|
|
4133
|
+
.cesko-rodne-cislo-view,
|
|
4134
|
+
.cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
|
|
4135
|
+
.kypros-national-passport-number-view,
|
|
4136
|
+
.danmark-personnummer-view,
|
|
4137
|
+
.deutschland-krankenversichertennummer-view,
|
|
4138
|
+
.eesti-isikukood-view,
|
|
4139
|
+
.ellada-dematerialised-securities-system-view,
|
|
4140
|
+
.england-national-health-service-number-view,
|
|
4141
|
+
.espana-codigo-de-identificacion-fiscal-view,
|
|
4142
|
+
.espana-tarjeta-sanitaria-individual-view,
|
|
4143
|
+
.france-numero-d-identification-au-repertoire-view,
|
|
4144
|
+
.hrvatska-osobni-identifikacijski-broj-view,
|
|
4145
|
+
.eire-individual-health-identifier-view,
|
|
4146
|
+
.island-kennitala-view,
|
|
4147
|
+
.italia-codice-fiscale-view,
|
|
4148
|
+
.latvija-personas-kods-view,
|
|
4149
|
+
.liechtenstein-national-identity-card-number-view,
|
|
4150
|
+
.liechtenstein-passport-number-view,
|
|
4151
|
+
.lietuva-asmens-kodas-view,
|
|
4152
|
+
.lietuva-pasas-view,
|
|
4153
|
+
.malta-national-identification-number-view,
|
|
4154
|
+
.malta-passport-number-view,
|
|
4155
|
+
.nederland-burgerservice-nummer-view,
|
|
4156
|
+
.nederland-identiteitskaart-nummer-view,
|
|
4157
|
+
.nederland-paspoort-nummer-view,
|
|
4158
|
+
.norge-fodselsnummer-view,
|
|
4159
|
+
.tuaisceart-eireann-health-and-care-number-view,
|
|
4160
|
+
.polska-numer-identyfikacji-podatkowej-view,
|
|
4161
|
+
.polska-pesel-view,
|
|
4162
|
+
.portugal-numero-de-identificacao-fiscal-view,
|
|
4163
|
+
.portugal-passaporte-view,
|
|
4164
|
+
.romania-cod-numeric-personal-view,
|
|
4165
|
+
.romania-pasaport-view,
|
|
4166
|
+
.slovenija-emso-view,
|
|
4167
|
+
.slovensko-pas-view,
|
|
4168
|
+
.slovensko-rodne-cislo-view,
|
|
4169
|
+
.suomi-henkilotunnus-view,
|
|
4170
|
+
.sverige-personnummer-view,
|
|
4171
|
+
.iban-view,
|
|
4172
|
+
.united-kingdom-national-health-service-number-view,
|
|
4173
|
+
.united-kingdom-national-insurance-number-view,
|
|
4174
|
+
.united-states-social-security-number-view,
|
|
4175
|
+
.aotearoa-national-health-index-view,
|
|
4176
|
+
.pilipinas-philhealth-identification-number-view,
|
|
4177
|
+
.brasil-cartao-nacional-de-saude-view,
|
|
4178
|
+
.schweiz-ahv-nummer-view,
|
|
4179
|
+
.canada-social-insurance-number-view,
|
|
4180
|
+
.hanguk-jumin-deungnok-beonho-view,
|
|
4181
|
+
.nihon-kojin-bango-view,
|
|
4182
|
+
.bharat-aadhaar-view,
|
|
4183
|
+
.yisrael-teudat-zehut-view,
|
|
4184
|
+
.south-africa-identity-number-view,
|
|
4185
|
+
.mexico-clave-unica-de-registro-de-poblacion-view,
|
|
4186
|
+
.singapore-national-registration-identity-card-view,
|
|
4187
|
+
.osterreich-sozialversicherungsnummer-view,
|
|
4188
|
+
.magyarorszag-taj-szam-view,
|
|
4189
|
+
.luxembourg-matricule-view,
|
|
4190
|
+
.zhongguo-jumin-shenfenzheng-haoma-view,
|
|
4191
|
+
.rossiya-snils-view,
|
|
4192
|
+
.turkiye-tc-kimlik-numarasi-view,
|
|
4193
|
+
.argentina-codigo-unico-de-identificacion-laboral-view,
|
|
4194
|
+
.ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
|
|
4195
|
+
.indonesia-nomor-induk-kependudukan-view,
|
|
4196
|
+
.prathet-thai-lek-prajam-tua-prachachon-view,
|
|
4197
|
+
.chile-rol-unico-nacional-view,
|
|
4198
|
+
.taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
|
|
4199
|
+
.hong-kong-identity-card-view,
|
|
4200
|
+
.iran-kod-e-melli-view,
|
|
4201
|
+
.as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
|
|
4202
|
+
.malaysia-kad-pengenalan-view,
|
|
4203
|
+
.viet-nam-can-cuoc-cong-dan-view,
|
|
4204
|
+
.pakistan-computerized-national-identity-card-view,
|
|
4205
|
+
.uruguay-cedula-de-identidad-view,
|
|
4206
|
+
.ecuador-cedula-de-identidad-view,
|
|
4207
|
+
.colombia-cedula-de-ciudadania-view,
|
|
4208
|
+
.australia-tax-file-number-view,
|
|
4209
|
+
.nigeria-national-identification-number-view,
|
|
4210
|
+
.misr-al-raqm-al-qawmi-view
|
|
4211
|
+
) {
|
|
4212
|
+
overflow-wrap: anywhere;
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
/* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
|
|
4216
|
+
:where(.summary-list, .summary-list-item, .description-list) {
|
|
4217
|
+
overflow-wrap: anywhere;
|
|
4218
|
+
}
|
|
4219
|
+
|
|
4220
|
+
:where(
|
|
4221
|
+
.grid,
|
|
4222
|
+
.flex-stack,
|
|
4223
|
+
.grail-layout,
|
|
4224
|
+
.summary-list,
|
|
4225
|
+
.summary-list-item,
|
|
4226
|
+
.description-list,
|
|
4227
|
+
.form,
|
|
4228
|
+
.editable-form,
|
|
4229
|
+
.field,
|
|
4230
|
+
.input-group,
|
|
4231
|
+
.button-group,
|
|
4232
|
+
.radio-group,
|
|
4233
|
+
.checkbox-group,
|
|
4234
|
+
.toggle-group,
|
|
4235
|
+
.tag-group,
|
|
4236
|
+
.split-view,
|
|
4237
|
+
.photo-pack,
|
|
4238
|
+
.data-filter-form,
|
|
4239
|
+
.action-bar,
|
|
4240
|
+
.tool-bar,
|
|
4241
|
+
.menu-bar,
|
|
4242
|
+
.tab-bar
|
|
4243
|
+
) > :where(*) {
|
|
4244
|
+
min-inline-size: 0;
|
|
4245
|
+
}
|
|
4246
|
+
|
|
3957
4247
|
/* ============================================================================
|
|
3958
4248
|
* Helper packages — layout and look, shared verbatim by all themes.
|
|
3959
4249
|
*
|
|
@@ -4081,6 +4371,8 @@
|
|
|
4081
4371
|
|
|
4082
4372
|
:where(.gantt-table-td[data-in-range]) {
|
|
4083
4373
|
background-color: var(--color-primary);
|
|
4374
|
+
/* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
|
|
4375
|
+
color: var(--color-primary-content);
|
|
4084
4376
|
}
|
|
4085
4377
|
|
|
4086
4378
|
:where(.gantt-table-td[data-in-range][data-milestone]) {
|
|
@@ -4103,3 +4395,334 @@
|
|
|
4103
4395
|
:where(.time-zone-picker-option) {
|
|
4104
4396
|
overflow-wrap: anywhere;
|
|
4105
4397
|
}
|
|
4398
|
+
|
|
4399
|
+
/* ============================================================================
|
|
4400
|
+
* Overflow navigation — shared verbatim by all themes.
|
|
4401
|
+
*
|
|
4402
|
+
* The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
|
|
4403
|
+
* With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
|
|
4404
|
+
* (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
|
|
4405
|
+
* the links that do not fit into the More list. That list is in normal flow (position
|
|
4406
|
+
* static, never absolute), so opening it pushes the content below down and never covers it
|
|
4407
|
+
* (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
|
|
4408
|
+
* specificity at zero, so any consumer rule wins.
|
|
4409
|
+
* ========================================================================= */
|
|
4410
|
+
|
|
4411
|
+
:where(.navigation-menu-list) {
|
|
4412
|
+
display: flex;
|
|
4413
|
+
flex: 1 1 auto;
|
|
4414
|
+
flex-wrap: wrap;
|
|
4415
|
+
align-items: flex-start;
|
|
4416
|
+
gap: 0.25rem 0.5rem;
|
|
4417
|
+
min-inline-size: 0;
|
|
4418
|
+
margin: 0;
|
|
4419
|
+
padding: 0;
|
|
4420
|
+
list-style: none;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
:where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
|
|
4424
|
+
display: inline-block;
|
|
4425
|
+
min-inline-size: 24px;
|
|
4426
|
+
min-block-size: 24px;
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
:where(.navigation-menu-more) {
|
|
4430
|
+
position: static;
|
|
4431
|
+
}
|
|
4432
|
+
|
|
4433
|
+
:where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
|
|
4434
|
+
display: none;
|
|
4435
|
+
}
|
|
4436
|
+
|
|
4437
|
+
:where(.navigation-menu-more-button) {
|
|
4438
|
+
min-inline-size: 24px;
|
|
4439
|
+
min-block-size: 24px;
|
|
4440
|
+
padding: 0.25rem 0.5rem;
|
|
4441
|
+
font: inherit;
|
|
4442
|
+
color: inherit;
|
|
4443
|
+
background: transparent;
|
|
4444
|
+
border: 1px solid currentcolor;
|
|
4445
|
+
cursor: pointer;
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
:where(.navigation-menu-more-list) {
|
|
4449
|
+
position: static;
|
|
4450
|
+
margin: 0.25rem 0 0;
|
|
4451
|
+
padding: 0;
|
|
4452
|
+
list-style: none;
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
/* ============================================================================
|
|
4456
|
+
* Container queries — shared verbatim by all themes.
|
|
4457
|
+
*
|
|
4458
|
+
* A component answers to the space it is given, not to the window: a summary
|
|
4459
|
+
* list in a narrow aside on a wide screen needs the narrow layout, which the
|
|
4460
|
+
* viewport query above cannot know. The three grail-layout regions are the
|
|
4461
|
+
* containers because their width comes from a grid track (`minmax(0, 1fr)`), so
|
|
4462
|
+
* inline-size containment cannot collapse them. `.card` is deliberately not a
|
|
4463
|
+
* container: in a shrink-to-fit parent (a flex row, an inline grid) containment
|
|
4464
|
+
* would collapse it to nothing. A component outside a grail region has no
|
|
4465
|
+
* container and keeps its wide layout. :where() keeps specificity at zero, so
|
|
4466
|
+
* any consumer rule wins.
|
|
4467
|
+
* ========================================================================= */
|
|
4468
|
+
|
|
4469
|
+
:where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
|
|
4470
|
+
container-type: inline-size;
|
|
4471
|
+
}
|
|
4472
|
+
|
|
4473
|
+
/* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
|
|
4474
|
+
window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
|
|
4475
|
+
Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
|
|
4476
|
+
(at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
|
|
4477
|
+
right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
|
|
4478
|
+
hidden, so all content stays reachable. */
|
|
4479
|
+
@media (max-width: 64rem) {
|
|
4480
|
+
:where(.grail-layout) {
|
|
4481
|
+
grid-template-areas:
|
|
4482
|
+
"header header"
|
|
4483
|
+
"left main"
|
|
4484
|
+
"right right"
|
|
4485
|
+
"footer footer";
|
|
4486
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
|
|
4487
|
+
grid-template-rows: auto auto auto auto;
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
|
|
4491
|
+
@media (max-width: 48rem) {
|
|
4492
|
+
:where(.grail-layout) {
|
|
4493
|
+
grid-template-areas:
|
|
4494
|
+
"header"
|
|
4495
|
+
"left"
|
|
4496
|
+
"main"
|
|
4497
|
+
"right"
|
|
4498
|
+
"footer";
|
|
4499
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4500
|
+
grid-template-rows: auto auto auto auto auto;
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4503
|
+
|
|
4504
|
+
@container (max-width: 30rem) {
|
|
4505
|
+
:where(.summary-list) {
|
|
4506
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4507
|
+
row-gap: 0.25rem;
|
|
4508
|
+
}
|
|
4509
|
+
|
|
4510
|
+
:where(.kanban-table-td) {
|
|
4511
|
+
min-width: 10rem;
|
|
4512
|
+
}
|
|
4513
|
+
|
|
4514
|
+
:where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
|
|
4515
|
+
padding-inline: 0.5rem;
|
|
4516
|
+
}
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
/* ============================================================================
|
|
4520
|
+
* Focus not obscured — shared verbatim by all themes.
|
|
4521
|
+
*
|
|
4522
|
+
* WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
|
|
4523
|
+
* entirely hidden by author-created content, such as a bar fixed to the top or
|
|
4524
|
+
* bottom of the viewport. The browser scrolls a focused control into view, but
|
|
4525
|
+
* only as far as the edge of the viewport, which is where a fixed bar sits.
|
|
4526
|
+
* `scroll-padding` moves that edge in by the bar's height.
|
|
4527
|
+
*
|
|
4528
|
+
* Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
|
|
4529
|
+
* theme's or an app's own fixed header, a mobile bottom navigation) sets the
|
|
4530
|
+
* bar's height on the root element:
|
|
4531
|
+
*
|
|
4532
|
+
* --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
|
|
4533
|
+
* --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
|
|
4534
|
+
*
|
|
4535
|
+
* With both bars, set both. The defaults are 0px, so a page without a fixed bar
|
|
4536
|
+
* is unchanged. Specificity is zero (`:where`), so an app's own
|
|
4537
|
+
* `scroll-padding` wins.
|
|
4538
|
+
* ========================================================================= */
|
|
4539
|
+
|
|
4540
|
+
:where(html) {
|
|
4541
|
+
scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
|
|
4542
|
+
}
|
|
4543
|
+
|
|
4544
|
+
/* ============================================================================
|
|
4545
|
+
* Text size and motion preferences — shared verbatim by all themes.
|
|
4546
|
+
*
|
|
4547
|
+
* The text-size-picker sets `data-text-size` on the root and the motion-picker
|
|
4548
|
+
* sets `data-motion`; neither styles anything itself. These rules are what make
|
|
4549
|
+
* the choice visible.
|
|
4550
|
+
*
|
|
4551
|
+
* Text size: the seven steps scale the root font size, and every theme sizes in
|
|
4552
|
+
* `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
|
|
4553
|
+
* own browser setting), and the scale is percentages of that, never pixels, so
|
|
4554
|
+
* a viewer who raised their browser font size keeps it. The steps below
|
|
4555
|
+
* `normal` are the viewer's explicit choice.
|
|
4556
|
+
*
|
|
4557
|
+
* Motion: `data-motion="reduce"` shortens every animation and transition to
|
|
4558
|
+
* 0.01ms instead of removing it. The end state still arrives and `animationend`
|
|
4559
|
+
* / `transitionend` still fire, so nothing that depends on them breaks and no
|
|
4560
|
+
* information is lost: a spinner's `role="status"` text, a disclosure's open
|
|
4561
|
+
* state and a toast's content are untouched. Scrolling is instant.
|
|
4562
|
+
* ========================================================================= */
|
|
4563
|
+
|
|
4564
|
+
:where(html[data-text-size="smallest"]) { font-size: 80%; }
|
|
4565
|
+
:where(html[data-text-size="smaller"]) { font-size: 90%; }
|
|
4566
|
+
:where(html[data-text-size="small"]) { font-size: 95%; }
|
|
4567
|
+
:where(html[data-text-size="normal"]) { font-size: 100%; }
|
|
4568
|
+
:where(html[data-text-size="large"]) { font-size: 110%; }
|
|
4569
|
+
:where(html[data-text-size="larger"]) { font-size: 125%; }
|
|
4570
|
+
:where(html[data-text-size="largest"]) { font-size: 150%; }
|
|
4571
|
+
|
|
4572
|
+
:where(html[data-motion="reduce"]) {
|
|
4573
|
+
scroll-behavior: auto;
|
|
4574
|
+
}
|
|
4575
|
+
:where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
|
|
4576
|
+
animation-duration: 0.01ms !important;
|
|
4577
|
+
animation-iteration-count: 1 !important;
|
|
4578
|
+
animation-delay: 0s !important;
|
|
4579
|
+
transition-duration: 0.01ms !important;
|
|
4580
|
+
transition-delay: 0s !important;
|
|
4581
|
+
scroll-behavior: auto !important;
|
|
4582
|
+
}
|
|
4583
|
+
|
|
4584
|
+
/* ============================================================================
|
|
4585
|
+
* Forced colours and contrast preference — shared verbatim by all themes.
|
|
4586
|
+
*
|
|
4587
|
+
* Forced colours (Windows High Contrast, `forced-colors: active`): the browser
|
|
4588
|
+
* replaces every colour with a system colour, which erases anything a control
|
|
4589
|
+
* told apart by background alone. These rules give such controls a border,
|
|
4590
|
+
* keep the focus ring, and mark selected and current items with `Highlight`
|
|
4591
|
+
* and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
|
|
4592
|
+
*
|
|
4593
|
+
* Contrast preference (`prefers-contrast: more`): a heavier border on controls
|
|
4594
|
+
* and a thicker focus ring. Colours are not changed here; a theme's colours are
|
|
4595
|
+
* its author's decision.
|
|
4596
|
+
* ========================================================================= */
|
|
4597
|
+
|
|
4598
|
+
@media (forced-colors: active) {
|
|
4599
|
+
:where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
|
|
4600
|
+
border: 1px solid ButtonBorder;
|
|
4601
|
+
}
|
|
4602
|
+
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
|
|
4603
|
+
outline: 3px solid Highlight;
|
|
4604
|
+
outline-offset: 2px;
|
|
4605
|
+
}
|
|
4606
|
+
:where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
|
|
4607
|
+
background: SelectedItem;
|
|
4608
|
+
color: SelectedItemText;
|
|
4609
|
+
forced-color-adjust: none;
|
|
4610
|
+
}
|
|
4611
|
+
:where([aria-current]:not([aria-current="false"])) {
|
|
4612
|
+
outline: 2px solid Highlight;
|
|
4613
|
+
outline-offset: -2px;
|
|
4614
|
+
}
|
|
4615
|
+
:where(:disabled, [aria-disabled="true"]) {
|
|
4616
|
+
border-color: GrayText;
|
|
4617
|
+
color: GrayText;
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
|
|
4621
|
+
@media (prefers-contrast: more) {
|
|
4622
|
+
:where(button, input, select, textarea, [role="button"], [class$="-button"]) {
|
|
4623
|
+
border-width: 2px;
|
|
4624
|
+
border-style: solid;
|
|
4625
|
+
border-color: currentColor;
|
|
4626
|
+
}
|
|
4627
|
+
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
|
|
4628
|
+
outline-width: 3px;
|
|
4629
|
+
outline-offset: 2px;
|
|
4630
|
+
}
|
|
4631
|
+
}
|
|
4632
|
+
|
|
4633
|
+
/* ============================================================================
|
|
4634
|
+
* Writing systems — shared verbatim by all themes.
|
|
4635
|
+
*
|
|
4636
|
+
* A theme names its Latin font stack (`--lily-font-body-latin`). This section
|
|
4637
|
+
* builds `--lily-font-body` from it, with the system fonts of the element's
|
|
4638
|
+
* script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
|
|
4639
|
+
* Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
|
|
4640
|
+
* scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
|
|
4641
|
+
* Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
|
|
4642
|
+
* Chinese and Japanese but drawn differently, so the language picks the font,
|
|
4643
|
+
* not the script.
|
|
4644
|
+
*
|
|
4645
|
+
* `--lily-font-body` is re-declared on every element with a `lang`, so a
|
|
4646
|
+
* `<p lang="ja">` inside an English page gets Japanese fonts and a
|
|
4647
|
+
* `<span lang="en">` inside it gets none. A language not listed here keeps the
|
|
4648
|
+
* Latin stack, whose final generic family the browser resolves per language.
|
|
4649
|
+
*
|
|
4650
|
+
* `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
|
|
4651
|
+
* and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
|
|
4652
|
+
* Elements with a `lang` use it; the app's body text should too.
|
|
4653
|
+
*
|
|
4654
|
+
* To change a theme's font, set `--lily-font-body-latin`; to change a script's,
|
|
4655
|
+
* set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
|
|
4656
|
+
* itself still works on the element you set it on.
|
|
4657
|
+
* ========================================================================= */
|
|
4658
|
+
|
|
4659
|
+
:where(:root, [lang]) {
|
|
4660
|
+
--lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
|
|
4661
|
+
--lily-line-height-body: 1.5;
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
:where([lang]) {
|
|
4665
|
+
--lily-font-script: initial;
|
|
4666
|
+
line-height: var(--lily-line-height-body);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4669
|
+
:where([lang|="zh"], [lang|="wuu"]) {
|
|
4670
|
+
--lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
|
|
4671
|
+
}
|
|
4672
|
+
:where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
|
|
4673
|
+
--lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
|
|
4674
|
+
}
|
|
4675
|
+
:where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
|
|
4676
|
+
--lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
|
|
4677
|
+
}
|
|
4678
|
+
:where([lang|="ja"]) {
|
|
4679
|
+
--lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
|
|
4680
|
+
}
|
|
4681
|
+
:where([lang|="ko"]) {
|
|
4682
|
+
--lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
|
|
4683
|
+
}
|
|
4684
|
+
:where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
|
|
4685
|
+
--lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
|
|
4686
|
+
}
|
|
4687
|
+
:where([lang|="ur"]) {
|
|
4688
|
+
--lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
|
|
4689
|
+
}
|
|
4690
|
+
:where([lang|="he"], [lang|="yi"]) {
|
|
4691
|
+
--lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
|
|
4692
|
+
}
|
|
4693
|
+
:where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
|
|
4694
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
|
|
4695
|
+
}
|
|
4696
|
+
:where([lang|="bn"], [lang|="as"]) {
|
|
4697
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
|
|
4698
|
+
}
|
|
4699
|
+
:where([lang|="gu"]) {
|
|
4700
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
|
|
4701
|
+
}
|
|
4702
|
+
:where([lang|="pa"]) {
|
|
4703
|
+
--lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
|
|
4704
|
+
}
|
|
4705
|
+
:where([lang|="kn"]) {
|
|
4706
|
+
--lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
|
|
4707
|
+
}
|
|
4708
|
+
:where([lang|="ta"]) {
|
|
4709
|
+
--lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
|
|
4710
|
+
}
|
|
4711
|
+
:where([lang|="te"]) {
|
|
4712
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
|
|
4713
|
+
}
|
|
4714
|
+
:where([lang|="th"]) {
|
|
4715
|
+
--lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
|
|
4716
|
+
}
|
|
4717
|
+
:where([lang|="lo"]) {
|
|
4718
|
+
--lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
|
|
4719
|
+
}
|
|
4720
|
+
:where([lang|="km"]) {
|
|
4721
|
+
--lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
|
|
4722
|
+
}
|
|
4723
|
+
:where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
|
|
4724
|
+
[lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
|
|
4725
|
+
[lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
|
|
4726
|
+
[lang|="lo"], [lang|="km"]) {
|
|
4727
|
+
--lily-line-height-body: 1.75;
|
|
4728
|
+
}
|