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