@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.
- package/LICENSE.md +8 -8
- package/dist/abyss.css +635 -22
- package/dist/acid.css +634 -21
- package/dist/adobe-spectrum.css +636 -23
- package/dist/ant-design.css +634 -21
- package/dist/aqua.css +636 -23
- package/dist/atlassian.css +634 -21
- package/dist/australia-agriculture-design-system.css +4575 -0
- package/dist/autumn.css +636 -23
- package/dist/black.css +635 -22
- package/dist/brazil-padrao-digital-de-governo.css +4575 -0
- package/dist/bumblebee.css +637 -24
- package/dist/business.css +635 -22
- package/dist/canada-government-of-canada-design-system.css +4575 -0
- package/dist/cappuccino.css +634 -21
- package/dist/caramellatte.css +635 -22
- package/dist/cmyk.css +634 -21
- package/dist/coffee.css +634 -21
- package/dist/corporate.css +638 -25
- package/dist/cupcake.css +635 -22
- package/dist/cyberpunk.css +634 -21
- package/dist/dark.css +636 -23
- package/dist/dim.css +634 -21
- package/dist/dracula.css +634 -21
- package/dist/emerald.css +635 -22
- package/dist/european-union-europa-component-library.css +4575 -0
- package/dist/excel.css +634 -21
- package/dist/fantasy.css +635 -22
- package/dist/fluent.css +634 -21
- package/dist/forest.css +634 -21
- package/dist/garden.css +636 -23
- package/dist/github-primer.css +634 -21
- package/dist/halloween.css +635 -22
- package/dist/ibm-carbon.css +634 -21
- package/dist/japan-digital-agency-design-system.css +4575 -0
- package/dist/lemonade.css +634 -21
- package/dist/light.css +635 -22
- package/dist/linear.css +634 -21
- package/dist/lofi.css +634 -21
- package/dist/luxury.css +634 -21
- package/dist/mozilla-protocol.css +636 -23
- package/dist/night.css +634 -21
- package/dist/nord.css +634 -21
- package/dist/notion.css +634 -21
- package/dist/pastel.css +641 -28
- package/dist/retro.css +638 -25
- package/dist/salesforce.css +634 -21
- package/dist/sap-fiori.css +634 -21
- package/dist/silk.css +635 -22
- package/dist/singapore-government-design-system.css +4575 -0
- package/dist/sunset.css +634 -21
- package/dist/synthwave.css +634 -21
- package/dist/united-kingdom-government-digital-service.css +634 -21
- package/dist/united-kingdom-national-health-service-england-for-patients.css +658 -32
- package/dist/united-kingdom-national-health-service-england-for-practitioners.css +656 -30
- package/dist/united-kingdom-national-health-service-scotland-for-patients.css +669 -40
- package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +664 -35
- package/dist/united-kingdom-national-health-service-wales-for-patients.css +669 -38
- package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +662 -31
- package/dist/united-states-web-design-system.css +635 -22
- package/dist/valentine.css +638 -25
- package/dist/vercel.css +634 -21
- package/dist/winter.css +635 -22
- package/dist/wireframe.css +634 -21
- package/index.md +8 -4
- package/package.json +2 -2
|
@@ -41,8 +41,10 @@
|
|
|
41
41
|
* ring; the practitioner UI just packs more information into the same
|
|
42
42
|
* viewport.
|
|
43
43
|
*
|
|
44
|
-
* Upstream tracked:
|
|
45
|
-
*
|
|
44
|
+
* Upstream tracked: nhsuk-frontend 10.7.1 (npm, published 2026-10-29;
|
|
45
|
+
* re-baselined from 9.x on 2026-10-29 against the package's Sass
|
|
46
|
+
* settings and CHANGELOG; v10 has been stable since 10.0.0 on
|
|
47
|
+
* 2025-08-26). Independent
|
|
46
48
|
* implementation against Lily class hooks; not affiliated with or
|
|
47
49
|
* endorsed by the NHS.
|
|
48
50
|
*
|
|
@@ -53,9 +55,13 @@
|
|
|
53
55
|
* - NHS frontend tokens (Sass source):
|
|
54
56
|
* https://github.com/nhsuk/nhsuk-frontend
|
|
55
57
|
* - Typography: Frutiger W01 (primary), Arial / system-ui fallback
|
|
56
|
-
* - Base font size: 16px
|
|
57
|
-
*
|
|
58
|
-
* -
|
|
58
|
+
* - Base font size: 16px; nhsuk-frontend 10 type scale points (tablet px):
|
|
59
|
+
* 14 / 16 / 19 / 22 / 26 / 36 / 48 / 64 (point 24 was removed in 10.0.0)
|
|
60
|
+
* - nhsuk-frontend 10 spacing points (px): 0, 4, 8, 16, 24, 32, 40, 48, 56, 64
|
|
61
|
+
* (unchanged from 9.x)
|
|
62
|
+
* - WCAG 2.2 AAA target. Upstream focus style (unchanged in v10): #FFEB3B
|
|
63
|
+
* fill with a 4px #212B32 bar (`$nhsuk-focus-width`); this theme's own
|
|
64
|
+
* focus ring is `--lily-focus-ring` below
|
|
59
65
|
*
|
|
60
66
|
* Brand palette (sRGB → OKLCH conversions used below)
|
|
61
67
|
* NHS Blue #005EB8 primary brand colour
|
|
@@ -70,7 +76,9 @@
|
|
|
70
76
|
* NHS White #FFFFFF page background
|
|
71
77
|
* NHS Warm Yellow #FFB81C warning / focus indicator
|
|
72
78
|
* NHS Emergency Red #DA291C error / destructive action
|
|
73
|
-
* NHS Green
|
|
79
|
+
* NHS.UK Green #007F3B success / confirmation (nhsuk-frontend 10
|
|
80
|
+
* `$nhsuk-success-colour`; was NHS Identity
|
|
81
|
+
* green #009639 until 2026-10-29)
|
|
74
82
|
* NHS Dark Green #006747 success hover
|
|
75
83
|
*
|
|
76
84
|
* Geometry rules (NHS frontend defaults)
|
|
@@ -153,9 +161,12 @@
|
|
|
153
161
|
/* ---- Success (NHS Green)
|
|
154
162
|
-------------------------------------------- */ /*
|
|
155
163
|
Confirmation, completed-step, "you have been booked"
|
|
156
|
-
panels. */ /* NHS
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
panels. */ /* NHS.UK frontend green #007F3B, nhsuk-frontend
|
|
165
|
+
10.7.1 `$nhsuk-success-colour` (core/settings/_colours-
|
|
166
|
+
applied.scss, new in v10). Re-baselined 2026-10-29 from NHS
|
|
167
|
+
Identity green #009639, which gave white content 4.37:1
|
|
168
|
+
(below AA); white content is now 5.19:1. */
|
|
169
|
+
--color-success: oklch(52% 0.14 151);
|
|
159
170
|
--color-success-content: oklch(100% 0 0);
|
|
160
171
|
/* ---- Warning (NHS Warm Yellow)
|
|
161
172
|
-------------------------------------- */ /* Caution
|
|
@@ -192,17 +203,27 @@
|
|
|
192
203
|
so checklist rows and field grids pack tightly. */
|
|
193
204
|
--size-selector: 0.125rem;
|
|
194
205
|
--size-field: 0.125rem;
|
|
195
|
-
/* Border width: 1px hairline,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
206
|
+
/* Border width: 1px hairline, Lily's own hairline, not an
|
|
207
|
+
upstream value: nhsuk-frontend 10 has no `$nhsuk-border-
|
|
208
|
+
width-form`; its form controls use `$nhsuk-border-width-
|
|
209
|
+
form-element` (2px). The hairline is the smallest legible
|
|
210
|
+
border on the LCDs used in clinical settings; going to
|
|
211
|
+
0.5px loses the edge on non-Retina workstation displays
|
|
212
|
+
still common in NHS estate. */
|
|
200
213
|
--border: 1px;
|
|
201
214
|
/* Depth & noise off — NHS guidance avoids shadows and
|
|
202
215
|
textures so */ /* the interface looks clinical, calm, and
|
|
203
216
|
easy to read. */
|
|
204
217
|
--depth: 0;
|
|
205
218
|
--noise: 0;
|
|
219
|
+
/* Fluid inline gutter for page containers and the main
|
|
220
|
+
region: grows with the viewport from a 1rem floor to a 2rem
|
|
221
|
+
ceiling. Spacing only, never text. */
|
|
222
|
+
--space-fluid-gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
|
|
223
|
+
/* Fluid gap between sections (stacks and grids): grows with
|
|
224
|
+
the viewport from a 1rem floor to a 2rem ceiling. Spacing
|
|
225
|
+
only, never text. */
|
|
226
|
+
--space-fluid-section: clamp(1rem, 0.75rem + 1vw, 2rem);
|
|
206
227
|
}
|
|
207
228
|
|
|
208
229
|
/* ----------------------------------------------------------------------------
|
|
@@ -304,7 +325,7 @@
|
|
|
304
325
|
/* --- Typography ---------------------------------------------------- */
|
|
305
326
|
/* Body font stack — system fonts first so consumers get a
|
|
306
327
|
native-feeling baseline without shipping a web font. */
|
|
307
|
-
--lily-font-body:
|
|
328
|
+
--lily-font-body-latin:
|
|
308
329
|
system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
309
330
|
Arial, sans-serif;
|
|
310
331
|
/* Monospaced font stack — used by code, kbd, identifiers, and
|
|
@@ -431,9 +452,12 @@
|
|
|
431
452
|
}
|
|
432
453
|
|
|
433
454
|
/* Invalid input — red border. The `aria-invalid="true"` attribute is the
|
|
434
|
-
ARIA contract
|
|
435
|
-
|
|
436
|
-
|
|
455
|
+
ARIA contract (server-rendered errors); `:user-invalid` is the native
|
|
456
|
+
state that matches only after the user has interacted, so a required
|
|
457
|
+
field is not styled invalid on load. Pairing a colour change with the
|
|
458
|
+
ARIA state keeps WCAG 1.4.1 (no colour-only meaning) honest. */
|
|
459
|
+
:where([class$="-input"], .input)[aria-invalid="true"],
|
|
460
|
+
:where([class$="-input"], .input):user-invalid {
|
|
437
461
|
border-color: var(--color-error);
|
|
438
462
|
}
|
|
439
463
|
|
|
@@ -1590,13 +1614,17 @@
|
|
|
1590
1614
|
padding: 0.25rem 0.5rem;
|
|
1591
1615
|
}
|
|
1592
1616
|
|
|
1593
|
-
/* Sticky promo —
|
|
1617
|
+
/* Sticky promo — stays at one edge of the viewport on scroll. A bottom banner must not also pin its top edge: with
|
|
1618
|
+
the component's own bottom: 0 it would stretch over the whole page and take every click. */
|
|
1594
1619
|
:where(.sticky-promo-banner) {
|
|
1595
1620
|
position: sticky;
|
|
1596
|
-
inset-block-start: 0;
|
|
1597
1621
|
z-index: 10;
|
|
1598
1622
|
}
|
|
1599
1623
|
|
|
1624
|
+
:where(.sticky-promo-banner:not([data-position="bottom"])) {
|
|
1625
|
+
inset-block-start: 0;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1600
1628
|
/* Error message — inline form-validation message. */
|
|
1601
1629
|
:where(.error-message) {
|
|
1602
1630
|
color: var(--lily-error-text);
|
|
@@ -1775,7 +1803,8 @@
|
|
|
1775
1803
|
|
|
1776
1804
|
/* --- Grail layout (5-region responsive page shell) --------------------- */
|
|
1777
1805
|
/* Header spans the top; left-aside / main / right-aside fill the middle;
|
|
1778
|
-
footer spans the bottom.
|
|
1806
|
+
footer spans the bottom. The collapse as the window narrows is in the shared
|
|
1807
|
+
container section at the end of this file. */
|
|
1779
1808
|
:where(.grail-layout) {
|
|
1780
1809
|
display: grid;
|
|
1781
1810
|
min-height: 100vh;
|
|
@@ -1818,14 +1847,6 @@
|
|
|
1818
1847
|
:where(.grail-layout-center-main) {
|
|
1819
1848
|
padding: 0.75rem;
|
|
1820
1849
|
}
|
|
1821
|
-
/* Mobile breakpoint — collapse to a single column, stacking the regions. */
|
|
1822
|
-
@media (max-width: 48rem) {
|
|
1823
|
-
:where(.grail-layout) {
|
|
1824
|
-
grid-template-areas: "header" "main" "left" "right" "footer";
|
|
1825
|
-
grid-template-columns: 1fr;
|
|
1826
|
-
grid-template-rows: auto auto auto auto auto;
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
1850
|
|
|
1830
1851
|
/* Standalone semantic header / footer landmarks. */
|
|
1831
1852
|
:where(.header) {
|
|
@@ -1915,6 +1936,15 @@
|
|
|
1915
1936
|
/* Drawers — side panels (right edge by default; RTL-aware via logical
|
|
1916
1937
|
properties). Sit above the overlay container (z-index 101). */
|
|
1917
1938
|
:where(.drawer, .slide-out-drawer, .sheet) {
|
|
1939
|
+
/* These are <dialog> elements opened with showModal() (P18-T6): undo the
|
|
1940
|
+
browser's centred-box defaults so the panel docks to the edge. */
|
|
1941
|
+
margin: 0;
|
|
1942
|
+
border: 0;
|
|
1943
|
+
inset-inline-start: auto;
|
|
1944
|
+
max-block-size: none;
|
|
1945
|
+
max-inline-size: none;
|
|
1946
|
+
block-size: 100%;
|
|
1947
|
+
box-sizing: border-box;
|
|
1918
1948
|
position: fixed;
|
|
1919
1949
|
inset-block: 0;
|
|
1920
1950
|
inset-inline-end: 0;
|
|
@@ -1927,6 +1957,10 @@
|
|
|
1927
1957
|
z-index: 101;
|
|
1928
1958
|
}
|
|
1929
1959
|
|
|
1960
|
+
:where(.drawer, .slide-out-drawer, .sheet)::backdrop {
|
|
1961
|
+
background-color: color-mix(in oklch, black 50%, transparent);
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1930
1964
|
/* ==========================================================================
|
|
1931
1965
|
* Menus
|
|
1932
1966
|
* ====================================================================== */
|
|
@@ -1979,7 +2013,7 @@
|
|
|
1979
2013
|
gap: 0.25rem;
|
|
1980
2014
|
}
|
|
1981
2015
|
/* Hamburger — bordered icon-button. */
|
|
1982
|
-
:where(.hamburger-menu) {
|
|
2016
|
+
:where(.hamburger-menu > button) {
|
|
1983
2017
|
display: inline-flex;
|
|
1984
2018
|
align-items: center;
|
|
1985
2019
|
justify-content: center;
|
|
@@ -2958,6 +2992,56 @@
|
|
|
2958
2992
|
}
|
|
2959
2993
|
}
|
|
2960
2994
|
|
|
2995
|
+
/* A closed popover stays closed. Author `display` beats the browser's own rule for a closed popover, so the
|
|
2996
|
+
menu rule above would otherwise leave every closed dropdown-menu and context-menu on the page. */
|
|
2997
|
+
:where([popover]:not(:popover-open)) {
|
|
2998
|
+
display: none;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
/* Anchored popups (P16-T4). These nine render `popover="manual"`, which puts them in the top layer; the
|
|
3002
|
+
browser's own popover style would centre them in the viewport. Closed, they are display: none (or `hidden`
|
|
3003
|
+
where the Popover API is missing). Where anchor positioning exists, the four that live inside a component
|
|
3004
|
+
open under that component's trigger or input, as wide as it at least; the five that stand alone (tooltip,
|
|
3005
|
+
hover card, floating panel, coachmark, popconfirm) open under the element the consumer names with
|
|
3006
|
+
`position-anchor`, or the invoker of a `popovertarget`. Those five use anchor() with a fallback, not
|
|
3007
|
+
position-area: with no anchor, position-area does nothing and a static position can be off screen. */
|
|
3008
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[hidden] {
|
|
3009
|
+
display: none;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover]:not(:popover-open) {
|
|
3013
|
+
display: none;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
@supports (position-area: block-end) {
|
|
3017
|
+
:where(.cascader-trigger) { anchor-name: --lily-cascader; }
|
|
3018
|
+
:where(.tree-select-trigger) { anchor-name: --lily-tree-select; }
|
|
3019
|
+
:where(.mentions-input-control) { anchor-name: --lily-mentions-input; }
|
|
3020
|
+
:where(.combobox > input) { anchor-name: --lily-combobox; }
|
|
3021
|
+
:where(.cascader-panel) { position-anchor: --lily-cascader; }
|
|
3022
|
+
:where(.tree-select-panel) { position-anchor: --lily-tree-select; }
|
|
3023
|
+
:where(.mentions-input-suggestions) { position-anchor: --lily-mentions-input; }
|
|
3024
|
+
:where(.combobox > [role="listbox"]) { position-anchor: --lily-combobox; }
|
|
3025
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"], .tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
|
|
3026
|
+
position: fixed;
|
|
3027
|
+
inset: auto;
|
|
3028
|
+
margin: 0;
|
|
3029
|
+
position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
|
|
3030
|
+
width: max-content;
|
|
3031
|
+
max-width: calc(100vw - 1rem);
|
|
3032
|
+
}
|
|
3033
|
+
:where(.tooltip, .hover-card, .floating-panel, .coachmark, .popconfirm-dialog)[popover] {
|
|
3034
|
+
inset-block-start: anchor(end, 25%);
|
|
3035
|
+
inset-inline-start: anchor(start, 25%);
|
|
3036
|
+
}
|
|
3037
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
|
|
3038
|
+
position-area: block-end span-inline-end;
|
|
3039
|
+
}
|
|
3040
|
+
:where(.cascader-panel, .tree-select-panel, .mentions-input-suggestions, .combobox > [role="listbox"])[popover] {
|
|
3041
|
+
min-inline-size: anchor-size(inline);
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
|
|
2961
3045
|
:where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
|
|
2962
3046
|
> :where(
|
|
2963
3047
|
.theme-picker-option,
|
|
@@ -3916,6 +4000,81 @@
|
|
|
3916
4000
|
min-block-size: 24px;
|
|
3917
4001
|
}
|
|
3918
4002
|
|
|
4003
|
+
/* ============================================================================
|
|
4004
|
+
* Coarse pointer targets — WCAG 2.2 2.5.5 (AAA), shared verbatim by all themes.
|
|
4005
|
+
*
|
|
4006
|
+
* Where the primary pointer is coarse (a finger), interactive hooks are at least
|
|
4007
|
+
* 44x44 CSS pixels: buttons, tabs, options, menu items, the page-header picker
|
|
4008
|
+
* buttons, form fields, checkboxes and radios, and the link-shaped navigation
|
|
4009
|
+
* hooks. Links inside running text are exempt, so bare `a` is not listed. The
|
|
4010
|
+
* query is the capability, never a viewport width. :where() keeps specificity
|
|
4011
|
+
* at zero, so any consumer rule still wins.
|
|
4012
|
+
* ========================================================================= */
|
|
4013
|
+
|
|
4014
|
+
@media (pointer: coarse) {
|
|
4015
|
+
:where(button,
|
|
4016
|
+
[role="button"],
|
|
4017
|
+
[role="tab"],
|
|
4018
|
+
[role="option"],
|
|
4019
|
+
[role="menuitem"],
|
|
4020
|
+
[class*="-picker-button"],
|
|
4021
|
+
summary,
|
|
4022
|
+
input:not([type="hidden"]),
|
|
4023
|
+
select,
|
|
4024
|
+
textarea,
|
|
4025
|
+
.action-link,
|
|
4026
|
+
.back-link,
|
|
4027
|
+
.breadcrumb-list-item > a,
|
|
4028
|
+
.pagination-list-item > a,
|
|
4029
|
+
.contents-list-item > a,
|
|
4030
|
+
.section-list-item > a) {
|
|
4031
|
+
min-inline-size: 44px;
|
|
4032
|
+
min-block-size: 44px;
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
/* ============================================================================
|
|
4037
|
+
* Brand colour — shared verbatim by all themes (spec/visual-identity, P21-T3).
|
|
4038
|
+
*
|
|
4039
|
+
* --lily-brand is the identity's decorative colour: a header band, a rule, a
|
|
4040
|
+
* logo background. It is NEVER a text colour or a control's boundary, because a
|
|
4041
|
+
* brand colour need not reach 4.5:1 (WCAG 1.4.3, 1.4.11). --lily-on-brand is the
|
|
4042
|
+
* text drawn on it. By default they follow the theme's primary pair, which every
|
|
4043
|
+
* theme keeps readable; an adopter whose brand colour is lighter or darker sets
|
|
4044
|
+
* both in their own CSS, with a pair of at least 4.5:1, and text keeps using the
|
|
4045
|
+
* content pairs (--color-base-content, --lily-error-text and so on).
|
|
4046
|
+
* ========================================================================== */
|
|
4047
|
+
|
|
4048
|
+
:where(:root) {
|
|
4049
|
+
--lily-brand: var(--color-primary);
|
|
4050
|
+
--lily-on-brand: var(--color-primary-content);
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
/* ============================================================================
|
|
4054
|
+
* Logo slot — shared verbatim by all themes (spec/visual-identity, P21-T4).
|
|
4055
|
+
*
|
|
4056
|
+
* The adopter's logo link carries data-lily-logo: an <a href="/"> holding the
|
|
4057
|
+
* adopter's own <img alt> or <svg role="img" aria-label>. Lily ships no logo
|
|
4058
|
+
* and no clear-space rule, because national and local guidelines disagree: a
|
|
4059
|
+
* theme or the adopter sets --lily-logo-clear-space (padding around the mark)
|
|
4060
|
+
* and --lily-logo-min-size (its smallest inline size). Both are unset by
|
|
4061
|
+
* default, so nothing changes until one is set.
|
|
4062
|
+
* ========================================================================== */
|
|
4063
|
+
|
|
4064
|
+
@layer lily {
|
|
4065
|
+
:where([data-lily-logo]) {
|
|
4066
|
+
display: inline-block;
|
|
4067
|
+
padding: var(--lily-logo-clear-space, 0);
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
:where([data-lily-logo] > img, [data-lily-logo] > svg) {
|
|
4071
|
+
display: block;
|
|
4072
|
+
min-inline-size: var(--lily-logo-min-size, 0);
|
|
4073
|
+
max-inline-size: 100%;
|
|
4074
|
+
block-size: auto;
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
|
|
3919
4078
|
/* ============================================================================
|
|
3920
4079
|
* Overflow guards — narrow-viewport safety, shared verbatim by all themes.
|
|
3921
4080
|
*
|
|
@@ -3944,6 +4103,140 @@
|
|
|
3944
4103
|
overflow-wrap: anywhere;
|
|
3945
4104
|
}
|
|
3946
4105
|
|
|
4106
|
+
/* ============================================================================
|
|
4107
|
+
* Scoped overflow — shared verbatim by all themes.
|
|
4108
|
+
*
|
|
4109
|
+
* Long unbroken strings (a national identifier, an email address, a URL) and
|
|
4110
|
+
* grid/flex tracks that refuse to shrink are the usual causes of horizontal
|
|
4111
|
+
* page scroll (WCAG 1.4.10). Both fixes are scoped, never put on `body` or `*`:
|
|
4112
|
+
* `overflow-wrap: anywhere` on the places a long value lands (table cells are
|
|
4113
|
+
* covered by Overflow guards above), and `min-inline-size: 0` on the direct
|
|
4114
|
+
* children of Lily's grid and flex containers so a child can shrink below its
|
|
4115
|
+
* content. The identifier `-view` list below is the catalog's 70 national
|
|
4116
|
+
* identifier views (components-categories.tsv); bin/check-theme fails when it
|
|
4117
|
+
* drifts from the catalog. :where() keeps specificity at zero.
|
|
4118
|
+
* ========================================================================= */
|
|
4119
|
+
|
|
4120
|
+
:where(
|
|
4121
|
+
.alba-community-health-index-view,
|
|
4122
|
+
.australia-individual-healthcare-identifier-view,
|
|
4123
|
+
.belgique-numero-de-registre-national-view,
|
|
4124
|
+
.bulgaria-edinen-grazhdanski-nomer-view,
|
|
4125
|
+
.cesko-cestovni-pas-view,
|
|
4126
|
+
.cesko-rodne-cislo-view,
|
|
4127
|
+
.cymru-rhif-y-gwasanaeth-iechyd-gwladol-view,
|
|
4128
|
+
.kypros-national-passport-number-view,
|
|
4129
|
+
.danmark-personnummer-view,
|
|
4130
|
+
.deutschland-krankenversichertennummer-view,
|
|
4131
|
+
.eesti-isikukood-view,
|
|
4132
|
+
.ellada-dematerialised-securities-system-view,
|
|
4133
|
+
.england-national-health-service-number-view,
|
|
4134
|
+
.espana-codigo-de-identificacion-fiscal-view,
|
|
4135
|
+
.espana-tarjeta-sanitaria-individual-view,
|
|
4136
|
+
.france-numero-d-identification-au-repertoire-view,
|
|
4137
|
+
.hrvatska-osobni-identifikacijski-broj-view,
|
|
4138
|
+
.eire-individual-health-identifier-view,
|
|
4139
|
+
.island-kennitala-view,
|
|
4140
|
+
.italia-codice-fiscale-view,
|
|
4141
|
+
.latvija-personas-kods-view,
|
|
4142
|
+
.liechtenstein-national-identity-card-number-view,
|
|
4143
|
+
.liechtenstein-passport-number-view,
|
|
4144
|
+
.lietuva-asmens-kodas-view,
|
|
4145
|
+
.lietuva-pasas-view,
|
|
4146
|
+
.malta-national-identification-number-view,
|
|
4147
|
+
.malta-passport-number-view,
|
|
4148
|
+
.nederland-burgerservice-nummer-view,
|
|
4149
|
+
.nederland-identiteitskaart-nummer-view,
|
|
4150
|
+
.nederland-paspoort-nummer-view,
|
|
4151
|
+
.norge-fodselsnummer-view,
|
|
4152
|
+
.tuaisceart-eireann-health-and-care-number-view,
|
|
4153
|
+
.polska-numer-identyfikacji-podatkowej-view,
|
|
4154
|
+
.polska-pesel-view,
|
|
4155
|
+
.portugal-numero-de-identificacao-fiscal-view,
|
|
4156
|
+
.portugal-passaporte-view,
|
|
4157
|
+
.romania-cod-numeric-personal-view,
|
|
4158
|
+
.romania-pasaport-view,
|
|
4159
|
+
.slovenija-emso-view,
|
|
4160
|
+
.slovensko-pas-view,
|
|
4161
|
+
.slovensko-rodne-cislo-view,
|
|
4162
|
+
.suomi-henkilotunnus-view,
|
|
4163
|
+
.sverige-personnummer-view,
|
|
4164
|
+
.iban-view,
|
|
4165
|
+
.united-kingdom-national-health-service-number-view,
|
|
4166
|
+
.united-kingdom-national-insurance-number-view,
|
|
4167
|
+
.united-states-social-security-number-view,
|
|
4168
|
+
.aotearoa-national-health-index-view,
|
|
4169
|
+
.pilipinas-philhealth-identification-number-view,
|
|
4170
|
+
.brasil-cartao-nacional-de-saude-view,
|
|
4171
|
+
.schweiz-ahv-nummer-view,
|
|
4172
|
+
.canada-social-insurance-number-view,
|
|
4173
|
+
.hanguk-jumin-deungnok-beonho-view,
|
|
4174
|
+
.nihon-kojin-bango-view,
|
|
4175
|
+
.bharat-aadhaar-view,
|
|
4176
|
+
.yisrael-teudat-zehut-view,
|
|
4177
|
+
.south-africa-identity-number-view,
|
|
4178
|
+
.mexico-clave-unica-de-registro-de-poblacion-view,
|
|
4179
|
+
.singapore-national-registration-identity-card-view,
|
|
4180
|
+
.osterreich-sozialversicherungsnummer-view,
|
|
4181
|
+
.magyarorszag-taj-szam-view,
|
|
4182
|
+
.luxembourg-matricule-view,
|
|
4183
|
+
.zhongguo-jumin-shenfenzheng-haoma-view,
|
|
4184
|
+
.rossiya-snils-view,
|
|
4185
|
+
.turkiye-tc-kimlik-numarasi-view,
|
|
4186
|
+
.argentina-codigo-unico-de-identificacion-laboral-view,
|
|
4187
|
+
.ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view,
|
|
4188
|
+
.indonesia-nomor-induk-kependudukan-view,
|
|
4189
|
+
.prathet-thai-lek-prajam-tua-prachachon-view,
|
|
4190
|
+
.chile-rol-unico-nacional-view,
|
|
4191
|
+
.taiwan-guomin-shenfenzheng-tongyi-bianhao-view,
|
|
4192
|
+
.hong-kong-identity-card-view,
|
|
4193
|
+
.iran-kod-e-melli-view,
|
|
4194
|
+
.as-saudiyah-raqm-al-huwiyah-al-wataniyah-view,
|
|
4195
|
+
.malaysia-kad-pengenalan-view,
|
|
4196
|
+
.viet-nam-can-cuoc-cong-dan-view,
|
|
4197
|
+
.pakistan-computerized-national-identity-card-view,
|
|
4198
|
+
.uruguay-cedula-de-identidad-view,
|
|
4199
|
+
.ecuador-cedula-de-identidad-view,
|
|
4200
|
+
.colombia-cedula-de-ciudadania-view,
|
|
4201
|
+
.australia-tax-file-number-view,
|
|
4202
|
+
.nigeria-national-identification-number-view,
|
|
4203
|
+
.misr-al-raqm-al-qawmi-view
|
|
4204
|
+
) {
|
|
4205
|
+
overflow-wrap: anywhere;
|
|
4206
|
+
}
|
|
4207
|
+
|
|
4208
|
+
/* overflow-wrap is inherited, so this reaches whatever the consumer puts in an item (dd, span, strong). */
|
|
4209
|
+
:where(.summary-list, .summary-list-item, .description-list) {
|
|
4210
|
+
overflow-wrap: anywhere;
|
|
4211
|
+
}
|
|
4212
|
+
|
|
4213
|
+
:where(
|
|
4214
|
+
.grid,
|
|
4215
|
+
.flex-stack,
|
|
4216
|
+
.grail-layout,
|
|
4217
|
+
.summary-list,
|
|
4218
|
+
.summary-list-item,
|
|
4219
|
+
.description-list,
|
|
4220
|
+
.form,
|
|
4221
|
+
.editable-form,
|
|
4222
|
+
.field,
|
|
4223
|
+
.input-group,
|
|
4224
|
+
.button-group,
|
|
4225
|
+
.radio-group,
|
|
4226
|
+
.checkbox-group,
|
|
4227
|
+
.toggle-group,
|
|
4228
|
+
.tag-group,
|
|
4229
|
+
.split-view,
|
|
4230
|
+
.photo-pack,
|
|
4231
|
+
.data-filter-form,
|
|
4232
|
+
.action-bar,
|
|
4233
|
+
.tool-bar,
|
|
4234
|
+
.menu-bar,
|
|
4235
|
+
.tab-bar
|
|
4236
|
+
) > :where(*) {
|
|
4237
|
+
min-inline-size: 0;
|
|
4238
|
+
}
|
|
4239
|
+
|
|
3947
4240
|
/* ============================================================================
|
|
3948
4241
|
* Helper packages — layout and look, shared verbatim by all themes.
|
|
3949
4242
|
*
|
|
@@ -4071,6 +4364,8 @@
|
|
|
4071
4364
|
|
|
4072
4365
|
:where(.gantt-table-td[data-in-range]) {
|
|
4073
4366
|
background-color: var(--color-primary);
|
|
4367
|
+
/* Text inside a bar (the Alpine port's milestone label, say) sits on the primary fill. */
|
|
4368
|
+
color: var(--color-primary-content);
|
|
4074
4369
|
}
|
|
4075
4370
|
|
|
4076
4371
|
:where(.gantt-table-td[data-in-range][data-milestone]) {
|
|
@@ -4093,3 +4388,334 @@
|
|
|
4093
4388
|
:where(.time-zone-picker-option) {
|
|
4094
4389
|
overflow-wrap: anywhere;
|
|
4095
4390
|
}
|
|
4391
|
+
|
|
4392
|
+
/* ============================================================================
|
|
4393
|
+
* Overflow navigation — shared verbatim by all themes.
|
|
4394
|
+
*
|
|
4395
|
+
* The `overflow` mode of `navigation-menu` (contract: components/navigation-menu/index.md).
|
|
4396
|
+
* With no script the list simply wraps, so every link stays reachable at 320 CSS pixels
|
|
4397
|
+
* (WCAG 1.4.10) and the "More" item stays `hidden`. With the script a ResizeObserver moves
|
|
4398
|
+
* the links that do not fit into the More list. That list is in normal flow (position
|
|
4399
|
+
* static, never absolute), so opening it pushes the content below down and never covers it
|
|
4400
|
+
* (WCAG 2.4.11). Every target is at least 24 x 24 CSS pixels (WCAG 2.5.8). :where() keeps
|
|
4401
|
+
* specificity at zero, so any consumer rule wins.
|
|
4402
|
+
* ========================================================================= */
|
|
4403
|
+
|
|
4404
|
+
:where(.navigation-menu-list) {
|
|
4405
|
+
display: flex;
|
|
4406
|
+
flex: 1 1 auto;
|
|
4407
|
+
flex-wrap: wrap;
|
|
4408
|
+
align-items: flex-start;
|
|
4409
|
+
gap: 0.25rem 0.5rem;
|
|
4410
|
+
min-inline-size: 0;
|
|
4411
|
+
margin: 0;
|
|
4412
|
+
padding: 0;
|
|
4413
|
+
list-style: none;
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
:where(.navigation-menu-list > li > a, .navigation-menu-more-list > li > a) {
|
|
4417
|
+
display: inline-block;
|
|
4418
|
+
min-inline-size: 24px;
|
|
4419
|
+
min-block-size: 24px;
|
|
4420
|
+
}
|
|
4421
|
+
|
|
4422
|
+
:where(.navigation-menu-more) {
|
|
4423
|
+
position: static;
|
|
4424
|
+
}
|
|
4425
|
+
|
|
4426
|
+
:where(.navigation-menu-more[hidden], .navigation-menu-more-list[hidden]) {
|
|
4427
|
+
display: none;
|
|
4428
|
+
}
|
|
4429
|
+
|
|
4430
|
+
:where(.navigation-menu-more-button) {
|
|
4431
|
+
min-inline-size: 24px;
|
|
4432
|
+
min-block-size: 24px;
|
|
4433
|
+
padding: 0.25rem 0.5rem;
|
|
4434
|
+
font: inherit;
|
|
4435
|
+
color: inherit;
|
|
4436
|
+
background: transparent;
|
|
4437
|
+
border: 1px solid currentcolor;
|
|
4438
|
+
cursor: pointer;
|
|
4439
|
+
}
|
|
4440
|
+
|
|
4441
|
+
:where(.navigation-menu-more-list) {
|
|
4442
|
+
position: static;
|
|
4443
|
+
margin: 0.25rem 0 0;
|
|
4444
|
+
padding: 0;
|
|
4445
|
+
list-style: none;
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
/* ============================================================================
|
|
4449
|
+
* Container queries — shared verbatim by all themes.
|
|
4450
|
+
*
|
|
4451
|
+
* A component answers to the space it is given, not to the window: a summary
|
|
4452
|
+
* list in a narrow aside on a wide screen needs the narrow layout, which the
|
|
4453
|
+
* viewport query above cannot know. The three grail-layout regions are the
|
|
4454
|
+
* containers because their width comes from a grid track (`minmax(0, 1fr)`), so
|
|
4455
|
+
* inline-size containment cannot collapse them. `.card` is deliberately not a
|
|
4456
|
+
* container: in a shrink-to-fit parent (a flex row, an inline grid) containment
|
|
4457
|
+
* would collapse it to nothing. A component outside a grail region has no
|
|
4458
|
+
* container and keeps its wide layout. :where() keeps specificity at zero, so
|
|
4459
|
+
* any consumer rule wins.
|
|
4460
|
+
* ========================================================================= */
|
|
4461
|
+
|
|
4462
|
+
:where(.grail-layout-left-aside, .grail-layout-center-main, .grail-layout-right-aside) {
|
|
4463
|
+
container-type: inline-size;
|
|
4464
|
+
}
|
|
4465
|
+
|
|
4466
|
+
/* grail-layout collapse (contract: components/grail-layout/AGENTS.md). The page shell answers to the
|
|
4467
|
+
window, so these are viewport queries: the grail-layout root is not a container, only its regions are.
|
|
4468
|
+
Priority: the right aside collapses first (at lg it drops below main, full width), then the left aside
|
|
4469
|
+
(at md everything is one column). Every step keeps DOM order = visual order (header, left aside, main,
|
|
4470
|
+
right aside, footer), so reading and tab order match what is seen (WCAG 1.3.2, 2.4.3); nothing is
|
|
4471
|
+
hidden, so all content stays reachable. */
|
|
4472
|
+
@media (max-width: 64rem) {
|
|
4473
|
+
:where(.grail-layout) {
|
|
4474
|
+
grid-template-areas:
|
|
4475
|
+
"header header"
|
|
4476
|
+
"left main"
|
|
4477
|
+
"right right"
|
|
4478
|
+
"footer footer";
|
|
4479
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
|
|
4480
|
+
grid-template-rows: auto auto auto auto;
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4484
|
+
@media (max-width: 48rem) {
|
|
4485
|
+
:where(.grail-layout) {
|
|
4486
|
+
grid-template-areas:
|
|
4487
|
+
"header"
|
|
4488
|
+
"left"
|
|
4489
|
+
"main"
|
|
4490
|
+
"right"
|
|
4491
|
+
"footer";
|
|
4492
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4493
|
+
grid-template-rows: auto auto auto auto auto;
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4497
|
+
@container (max-width: 30rem) {
|
|
4498
|
+
:where(.summary-list) {
|
|
4499
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4500
|
+
row-gap: 0.25rem;
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
:where(.kanban-table-td) {
|
|
4504
|
+
min-width: 10rem;
|
|
4505
|
+
}
|
|
4506
|
+
|
|
4507
|
+
:where(.data-table, .calendar-table, .kanban-table, .gantt-table) :where(th, td) {
|
|
4508
|
+
padding-inline: 0.5rem;
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
|
|
4512
|
+
/* ============================================================================
|
|
4513
|
+
* Focus not obscured — shared verbatim by all themes.
|
|
4514
|
+
*
|
|
4515
|
+
* WCAG 2.2 SC 2.4.11 (Focus Not Obscured, Minimum): a focused control is never
|
|
4516
|
+
* entirely hidden by author-created content, such as a bar fixed to the top or
|
|
4517
|
+
* bottom of the viewport. The browser scrolls a focused control into view, but
|
|
4518
|
+
* only as far as the edge of the viewport, which is where a fixed bar sits.
|
|
4519
|
+
* `scroll-padding` moves that edge in by the bar's height.
|
|
4520
|
+
*
|
|
4521
|
+
* Contract: whatever fixes a bar to the viewport (sticky-promo-banner, a
|
|
4522
|
+
* theme's or an app's own fixed header, a mobile bottom navigation) sets the
|
|
4523
|
+
* bar's height on the root element:
|
|
4524
|
+
*
|
|
4525
|
+
* --lily-fixed-bar-block-start: 4rem; (a bar fixed at the top)
|
|
4526
|
+
* --lily-fixed-bar-block-end: 3rem; (a bar fixed at the bottom)
|
|
4527
|
+
*
|
|
4528
|
+
* With both bars, set both. The defaults are 0px, so a page without a fixed bar
|
|
4529
|
+
* is unchanged. Specificity is zero (`:where`), so an app's own
|
|
4530
|
+
* `scroll-padding` wins.
|
|
4531
|
+
* ========================================================================= */
|
|
4532
|
+
|
|
4533
|
+
:where(html) {
|
|
4534
|
+
scroll-padding-block: var(--lily-fixed-bar-block-start, 0px) var(--lily-fixed-bar-block-end, 0px);
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4537
|
+
/* ============================================================================
|
|
4538
|
+
* Text size and motion preferences — shared verbatim by all themes.
|
|
4539
|
+
*
|
|
4540
|
+
* The text-size-picker sets `data-text-size` on the root and the motion-picker
|
|
4541
|
+
* sets `data-motion`; neither styles anything itself. These rules are what make
|
|
4542
|
+
* the choice visible.
|
|
4543
|
+
*
|
|
4544
|
+
* Text size: the seven steps scale the root font size, and every theme sizes in
|
|
4545
|
+
* `rem`, so the whole page follows (WCAG 1.4.4). `normal` is 100% (the viewer's
|
|
4546
|
+
* own browser setting), and the scale is percentages of that, never pixels, so
|
|
4547
|
+
* a viewer who raised their browser font size keeps it. The steps below
|
|
4548
|
+
* `normal` are the viewer's explicit choice.
|
|
4549
|
+
*
|
|
4550
|
+
* Motion: `data-motion="reduce"` shortens every animation and transition to
|
|
4551
|
+
* 0.01ms instead of removing it. The end state still arrives and `animationend`
|
|
4552
|
+
* / `transitionend` still fire, so nothing that depends on them breaks and no
|
|
4553
|
+
* information is lost: a spinner's `role="status"` text, a disclosure's open
|
|
4554
|
+
* state and a toast's content are untouched. Scrolling is instant.
|
|
4555
|
+
* ========================================================================= */
|
|
4556
|
+
|
|
4557
|
+
:where(html[data-text-size="smallest"]) { font-size: 80%; }
|
|
4558
|
+
:where(html[data-text-size="smaller"]) { font-size: 90%; }
|
|
4559
|
+
:where(html[data-text-size="small"]) { font-size: 95%; }
|
|
4560
|
+
:where(html[data-text-size="normal"]) { font-size: 100%; }
|
|
4561
|
+
:where(html[data-text-size="large"]) { font-size: 110%; }
|
|
4562
|
+
:where(html[data-text-size="larger"]) { font-size: 125%; }
|
|
4563
|
+
:where(html[data-text-size="largest"]) { font-size: 150%; }
|
|
4564
|
+
|
|
4565
|
+
:where(html[data-motion="reduce"]) {
|
|
4566
|
+
scroll-behavior: auto;
|
|
4567
|
+
}
|
|
4568
|
+
:where(html[data-motion="reduce"], html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after) {
|
|
4569
|
+
animation-duration: 0.01ms !important;
|
|
4570
|
+
animation-iteration-count: 1 !important;
|
|
4571
|
+
animation-delay: 0s !important;
|
|
4572
|
+
transition-duration: 0.01ms !important;
|
|
4573
|
+
transition-delay: 0s !important;
|
|
4574
|
+
scroll-behavior: auto !important;
|
|
4575
|
+
}
|
|
4576
|
+
|
|
4577
|
+
/* ============================================================================
|
|
4578
|
+
* Forced colours and contrast preference — shared verbatim by all themes.
|
|
4579
|
+
*
|
|
4580
|
+
* Forced colours (Windows High Contrast, `forced-colors: active`): the browser
|
|
4581
|
+
* replaces every colour with a system colour, which erases anything a control
|
|
4582
|
+
* told apart by background alone. These rules give such controls a border,
|
|
4583
|
+
* keep the focus ring, and mark selected and current items with `Highlight`
|
|
4584
|
+
* and `SelectedItem` rather than a tint (WCAG 1.4.1, 2.4.7, 1.4.11).
|
|
4585
|
+
*
|
|
4586
|
+
* Contrast preference (`prefers-contrast: more`): a heavier border on controls
|
|
4587
|
+
* and a thicker focus ring. Colours are not changed here; a theme's colours are
|
|
4588
|
+
* its author's decision.
|
|
4589
|
+
* ========================================================================= */
|
|
4590
|
+
|
|
4591
|
+
@media (forced-colors: active) {
|
|
4592
|
+
:where(button, input, select, textarea, summary, [role="button"], [role="option"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [role="radio"], [class$="-button"]) {
|
|
4593
|
+
border: 1px solid ButtonBorder;
|
|
4594
|
+
}
|
|
4595
|
+
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
|
|
4596
|
+
outline: 3px solid Highlight;
|
|
4597
|
+
outline-offset: 2px;
|
|
4598
|
+
}
|
|
4599
|
+
:where([aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [data-active]) {
|
|
4600
|
+
background: SelectedItem;
|
|
4601
|
+
color: SelectedItemText;
|
|
4602
|
+
forced-color-adjust: none;
|
|
4603
|
+
}
|
|
4604
|
+
:where([aria-current]:not([aria-current="false"])) {
|
|
4605
|
+
outline: 2px solid Highlight;
|
|
4606
|
+
outline-offset: -2px;
|
|
4607
|
+
}
|
|
4608
|
+
:where(:disabled, [aria-disabled="true"]) {
|
|
4609
|
+
border-color: GrayText;
|
|
4610
|
+
color: GrayText;
|
|
4611
|
+
}
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
@media (prefers-contrast: more) {
|
|
4615
|
+
:where(button, input, select, textarea, [role="button"], [class$="-button"]) {
|
|
4616
|
+
border-width: 2px;
|
|
4617
|
+
border-style: solid;
|
|
4618
|
+
border-color: currentColor;
|
|
4619
|
+
}
|
|
4620
|
+
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="option"], [role="tab"], [class$="-button"]):focus-visible {
|
|
4621
|
+
outline-width: 3px;
|
|
4622
|
+
outline-offset: 2px;
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
|
|
4626
|
+
/* ============================================================================
|
|
4627
|
+
* Writing systems — shared verbatim by all themes.
|
|
4628
|
+
*
|
|
4629
|
+
* A theme names its Latin font stack (`--lily-font-body-latin`). This section
|
|
4630
|
+
* builds `--lily-font-body` from it, with the system fonts of the element's
|
|
4631
|
+
* script in front: Chinese (Simplified, Traditional, Hong Kong), Japanese,
|
|
4632
|
+
* Korean, Arabic script (Arabic, Persian, Urdu in Nastaliq), Hebrew, the Indic
|
|
4633
|
+
* scripts the site's locales use (Devanagari, Bengali, Gujarati, Gurmukhi,
|
|
4634
|
+
* Kannada, Tamil, Telugu), Thai, Lao and Khmer. Han characters are shared by
|
|
4635
|
+
* Chinese and Japanese but drawn differently, so the language picks the font,
|
|
4636
|
+
* not the script.
|
|
4637
|
+
*
|
|
4638
|
+
* `--lily-font-body` is re-declared on every element with a `lang`, so a
|
|
4639
|
+
* `<p lang="ja">` inside an English page gets Japanese fonts and a
|
|
4640
|
+
* `<span lang="en">` inside it gets none. A language not listed here keeps the
|
|
4641
|
+
* Latin stack, whose final generic family the browser resolves per language.
|
|
4642
|
+
*
|
|
4643
|
+
* `--lily-line-height-body` is 1.5, and 1.75 for scripts with tall marks above
|
|
4644
|
+
* and below the line (Arabic script, the Indic scripts, Thai, Lao, Khmer).
|
|
4645
|
+
* Elements with a `lang` use it; the app's body text should too.
|
|
4646
|
+
*
|
|
4647
|
+
* To change a theme's font, set `--lily-font-body-latin`; to change a script's,
|
|
4648
|
+
* set `--lily-font-script` under `:lang(...)`. Overriding `--lily-font-body`
|
|
4649
|
+
* itself still works on the element you set it on.
|
|
4650
|
+
* ========================================================================= */
|
|
4651
|
+
|
|
4652
|
+
:where(:root, [lang]) {
|
|
4653
|
+
--lily-font-body: var(--lily-font-script,) var(--lily-font-body-latin);
|
|
4654
|
+
--lily-line-height-body: 1.5;
|
|
4655
|
+
}
|
|
4656
|
+
|
|
4657
|
+
:where([lang]) {
|
|
4658
|
+
--lily-font-script: initial;
|
|
4659
|
+
line-height: var(--lily-line-height-body);
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
:where([lang|="zh"], [lang|="wuu"]) {
|
|
4663
|
+
--lily-font-script: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",;
|
|
4664
|
+
}
|
|
4665
|
+
:where([lang|="zh-Hant"], [lang="zh-TW"], [lang|="zh-Hant-TW"]) {
|
|
4666
|
+
--lily-font-script: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC",;
|
|
4667
|
+
}
|
|
4668
|
+
:where([lang="zh-HK"], [lang="zh-MO"], [lang|="zh-Hant-HK"], [lang|="yue"]) {
|
|
4669
|
+
--lily-font-script: "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", "Source Han Sans HC",;
|
|
4670
|
+
}
|
|
4671
|
+
:where([lang|="ja"]) {
|
|
4672
|
+
--lily-font-script: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP",;
|
|
4673
|
+
}
|
|
4674
|
+
:where([lang|="ko"]) {
|
|
4675
|
+
--lily-font-script: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",;
|
|
4676
|
+
}
|
|
4677
|
+
:where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"]) {
|
|
4678
|
+
--lily-font-script: "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma,;
|
|
4679
|
+
}
|
|
4680
|
+
:where([lang|="ur"]) {
|
|
4681
|
+
--lily-font-script: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma,;
|
|
4682
|
+
}
|
|
4683
|
+
:where([lang|="he"], [lang|="yi"]) {
|
|
4684
|
+
--lily-font-script: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew",;
|
|
4685
|
+
}
|
|
4686
|
+
:where([lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"]) {
|
|
4687
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari",;
|
|
4688
|
+
}
|
|
4689
|
+
:where([lang|="bn"], [lang|="as"]) {
|
|
4690
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Bangla", "Bangla Sangam MN", "Noto Sans Bengali",;
|
|
4691
|
+
}
|
|
4692
|
+
:where([lang|="gu"]) {
|
|
4693
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Gujarati", "Gujarati Sangam MN", "Noto Sans Gujarati",;
|
|
4694
|
+
}
|
|
4695
|
+
:where([lang|="pa"]) {
|
|
4696
|
+
--lily-font-script: "Nirmala UI", "Gurmukhi Sangam MN", "Gurmukhi MN", "Noto Sans Gurmukhi",;
|
|
4697
|
+
}
|
|
4698
|
+
:where([lang|="kn"]) {
|
|
4699
|
+
--lily-font-script: "Nirmala UI", "Kannada Sangam MN", "Noto Sans Kannada",;
|
|
4700
|
+
}
|
|
4701
|
+
:where([lang|="ta"]) {
|
|
4702
|
+
--lily-font-script: "Nirmala UI", "Tamil Sangam MN", "Noto Sans Tamil",;
|
|
4703
|
+
}
|
|
4704
|
+
:where([lang|="te"]) {
|
|
4705
|
+
--lily-font-script: "Nirmala UI", "Kohinoor Telugu", "Telugu Sangam MN", "Noto Sans Telugu",;
|
|
4706
|
+
}
|
|
4707
|
+
:where([lang|="th"]) {
|
|
4708
|
+
--lily-font-script: "Leelawadee UI", Thonburi, "Noto Sans Thai",;
|
|
4709
|
+
}
|
|
4710
|
+
:where([lang|="lo"]) {
|
|
4711
|
+
--lily-font-script: "Leelawadee UI", "Lao Sangam MN", "Noto Sans Lao",;
|
|
4712
|
+
}
|
|
4713
|
+
:where([lang|="km"]) {
|
|
4714
|
+
--lily-font-script: "Khmer UI", "Khmer Sangam MN", "Noto Sans Khmer",;
|
|
4715
|
+
}
|
|
4716
|
+
:where([lang|="ar"], [lang|="fa"], [lang|="ps"], [lang|="ku"], [lang|="sd"], [lang|="ug"], [lang|="ur"],
|
|
4717
|
+
[lang|="hi"], [lang|="mr"], [lang|="ne"], [lang|="bh"], [lang|="sa"], [lang|="mai"], [lang|="bn"],
|
|
4718
|
+
[lang|="as"], [lang|="gu"], [lang|="pa"], [lang|="kn"], [lang|="ta"], [lang|="te"], [lang|="th"],
|
|
4719
|
+
[lang|="lo"], [lang|="km"]) {
|
|
4720
|
+
--lily-line-height-body: 1.75;
|
|
4721
|
+
}
|