@getvitops/generator 0.9.0 → 2.0.0
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/CHANGELOG.md +1031 -0
- package/README.md +24 -5
- package/assets/bricks/elements/icon.php +102 -0
- package/assets/bricks/elements/split.php +8 -5
- package/assets/bricks/load.php +137 -1
- package/assets/css/animation.css +147 -36
- package/assets/css/global.css +19 -3
- package/assets/css/index.css +8 -0
- package/assets/css/layout-utilities.css +764 -0
- package/assets/css/layout.css +50 -584
- package/assets/css/patterns/carousel.css +3 -3
- package/assets/css/patterns/code.css +2 -2
- package/assets/css/patterns/combobox.css +3 -3
- package/assets/css/patterns/comment.css +1 -1
- package/assets/css/patterns/consent.css +117 -0
- package/assets/css/patterns/copy.css +3 -3
- package/assets/css/patterns/details.css +1 -1
- package/assets/css/patterns/dialog.css +2 -2
- package/assets/css/patterns/drawer.css +2 -2
- package/assets/css/patterns/forms.css +11 -11
- package/assets/css/patterns/grouped.css +1 -1
- package/assets/css/patterns/icon.css +2 -2
- package/assets/css/patterns/list.css +5 -5
- package/assets/css/patterns/media.css +1 -1
- package/assets/css/patterns/nav.css +5 -5
- package/assets/css/patterns/notification.css +3 -3
- package/assets/css/patterns/reveal.css +92 -0
- package/assets/css/patterns/scroll-based.css +1 -1
- package/assets/css/patterns/scroll-target.css +3 -3
- package/assets/css/patterns/sitenav.css +14 -14
- package/assets/css/patterns/split-link.css +4 -4
- package/assets/css/patterns/subgrid.css +7 -2
- package/assets/css/patterns/tag.css +1 -1
- package/assets/css/patterns/text-effects.css +1 -1
- package/assets/css/patterns/theme-editor.css +43 -6
- package/assets/css/patterns/tooltip.css +2 -2
- package/assets/css/patterns/tree.css +3 -3
- package/assets/css/utilities.css +19 -98
- package/assets/js/consent.js +1 -0
- package/assets/js/deferred.js +1 -1
- package/assets/js/editor.js +2 -2
- package/dist/index.d.mts +1218 -376
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4384 -1784
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
- package/schema.json +54 -12
- package/site.schema.json +648 -458
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
border-radius: var(--_br);
|
|
21
21
|
|
|
22
22
|
&:focus {
|
|
23
|
-
outline: 2px solid var(--combobox-focus-color, var(--color-
|
|
23
|
+
outline: 2px solid var(--combobox-focus-color, var(--color-border-focus));
|
|
24
24
|
outline-offset: 2px;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
border: var(--_b);
|
|
36
36
|
border-radius: var(--_br);
|
|
37
37
|
box-shadow: var(--_ds);
|
|
38
|
-
background: var(--
|
|
38
|
+
background: var(--color-bg-surface);
|
|
39
39
|
max-block-size: 15rem;
|
|
40
40
|
overflow-y: auto;
|
|
41
41
|
list-style: none;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
&:hover,
|
|
57
57
|
&[aria-selected='true'] {
|
|
58
|
-
background: var(--color-surface-muted);
|
|
58
|
+
background: var(--color-bg-surface-muted);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&[aria-disabled='true'] {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
grid-column: 1 / -1;
|
|
63
63
|
margin-inline-start: var(--comment-indent, 2rem);
|
|
64
64
|
padding-inline-start: var(--comment-indent, 2rem);
|
|
65
|
-
border-inline-start: 2px solid var(--color-surface-muted);
|
|
65
|
+
border-inline-start: 2px solid var(--color-bg-surface-muted);
|
|
66
66
|
display: flex;
|
|
67
67
|
flex-direction: column;
|
|
68
68
|
gap: 1rem;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent — the docked banner `<wc-consent>` reveals.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately thin: this partial owns the *dock* (where the thing sits and how it
|
|
5
|
+
* stacks) and nothing else. Everything inside it is composed from patterns that
|
|
6
|
+
* already exist — `.banner`, `.cluster`, `.btn`, `.cta`, the form patterns — so a
|
|
7
|
+
* consumer restyles their consent banner by restyling those, not by learning a
|
|
8
|
+
* second vocabulary.
|
|
9
|
+
*
|
|
10
|
+
* **Shown in the top layer via the Popover API**, for the same reason `.tooltip`
|
|
11
|
+
* is: a plain `position: fixed` banner resolves against the nearest containing
|
|
12
|
+
* block, and any ancestor with `container-type`, `transform`, `filter` or
|
|
13
|
+
* `contain` becomes one. `body { container-type: inline-size }` is a normal thing
|
|
14
|
+
* to write in a framework whose breakpoints are container queries — and it traps a
|
|
15
|
+
* fixed banner mid-page. The top layer escapes the containing-block chain
|
|
16
|
+
* entirely, so the dock is always the viewport and no z-index can lose to
|
|
17
|
+
* anything. `popover="manual"` (not `auto`): a light-dismiss banner would let a
|
|
18
|
+
* stray click count as a decision.
|
|
19
|
+
*
|
|
20
|
+
* The other reason it's fixed-and-floating: the banner appears after hydration,
|
|
21
|
+
* and out of flow it can't push content, so it contributes nothing to CLS. A
|
|
22
|
+
* statically-positioned bar inserted at the top of the document would shift the
|
|
23
|
+
* whole page and cost the metric the deferred script-loading strategy protects.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* ── Consent — bottom-docked banner shown while a choice is outstanding ────── */
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Layout only — `display` is set by the open/closed rules below.
|
|
30
|
+
*
|
|
31
|
+
* `[popover].consent` (0-2-0) rather than `.consent` (0-1-0) on purpose: this
|
|
32
|
+
* partial is imported *after* popover.css, whose `[popover] { &:not(:popover-open)
|
|
33
|
+
* { display: none } }` sits at 0-1-0. A bare `.consent { display: flex }` would
|
|
34
|
+
* tie on specificity, win on order, and reveal a closed popover.
|
|
35
|
+
*/
|
|
36
|
+
.consent {
|
|
37
|
+
--_p: var(--p-consent, var(--p-consent-group, var(--p-default)));
|
|
38
|
+
--_br: var(--br-consent, var(--br-consent-group, var(--br-default)));
|
|
39
|
+
--_ds: var(--ds-consent, var(--ds-consent-group, var(--ds-default)));
|
|
40
|
+
--_b: var(--b-consent, var(--b-consent-group, var(--b-default)));
|
|
41
|
+
|
|
42
|
+
position: fixed;
|
|
43
|
+
z-index: 100;
|
|
44
|
+
/* The gap is an inset, not a block margin: for an absolutely positioned box the
|
|
45
|
+
offsets resolve against the margin edge, so `inset-block-end: 0` plus a bottom
|
|
46
|
+
margin still sits flush to the viewport edge. Inline centring does come from
|
|
47
|
+
`margin-inline: auto`, where that resolution is the one we want. */
|
|
48
|
+
inset-block-end: 1rem;
|
|
49
|
+
inset-inline: 0;
|
|
50
|
+
inset-block-start: auto;
|
|
51
|
+
margin-inline: auto;
|
|
52
|
+
max-inline-size: min(48rem, calc(100% - 2rem));
|
|
53
|
+
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 1rem;
|
|
57
|
+
padding: var(--_p);
|
|
58
|
+
border: var(--_b);
|
|
59
|
+
border-radius: var(--_br);
|
|
60
|
+
box-shadow: var(--_ds);
|
|
61
|
+
background: var(--color-bg-surface);
|
|
62
|
+
color: var(--color-text-surface);
|
|
63
|
+
|
|
64
|
+
/* Clear an iOS home indicator. */
|
|
65
|
+
padding-block-end: max(var(--_p), env(safe-area-inset-bottom));
|
|
66
|
+
|
|
67
|
+
.consent__body {
|
|
68
|
+
flex: 1 1 20rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.consent__actions {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
gap: 0.5rem;
|
|
75
|
+
margin-inline-start: auto;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The per-category checkboxes. Two buttons answer a one-category question, so
|
|
79
|
+
`<CookieConsent />` only renders these when there is more than one — a banner
|
|
80
|
+
that demands reading is a banner that gets accepted unread. */
|
|
81
|
+
.consent__options {
|
|
82
|
+
flex-basis: 100%;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
gap: 1rem;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Open, in the top layer. */
|
|
90
|
+
[popover].consent:popover-open {
|
|
91
|
+
display: flex;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* The no-popover path: `<wc-consent>` strips the attribute when `showPopover` is
|
|
95
|
+
missing and falls back to toggling `hidden`, so this needs no `:popover-open`
|
|
96
|
+
support to work. `[hidden]` comes last and wins over both. */
|
|
97
|
+
.consent:not([popover]) {
|
|
98
|
+
display: flex;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.consent[hidden],
|
|
102
|
+
wc-consent[hidden] {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
107
|
+
.consent {
|
|
108
|
+
animation: consent-enter 0.25s ease-out;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes consent-enter {
|
|
113
|
+
from {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
translate: 0 1rem;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:focus-visible {
|
|
41
|
-
outline: 2px solid var(--copy-focus-color, var(--color-
|
|
41
|
+
outline: 2px solid var(--copy-focus-color, var(--color-border-focus));
|
|
42
42
|
outline-offset: 2px;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
font-size: 0.75rem;
|
|
67
67
|
border-radius: 0.25rem;
|
|
68
68
|
white-space: nowrap;
|
|
69
|
-
background: var(--
|
|
70
|
-
color: var(--
|
|
69
|
+
background: var(--color-text-surface);
|
|
70
|
+
color: var(--color-bg-surface);
|
|
71
71
|
opacity: 0;
|
|
72
72
|
visibility: hidden;
|
|
73
73
|
transition:
|
|
@@ -42,7 +42,7 @@ details,
|
|
|
42
42
|
*
|
|
43
43
|
* This carried the canonical open/close animation (`block-size: 0 → auto` with
|
|
44
44
|
* `content-visibility` under `allow-discrete`, backed by the
|
|
45
|
-
* `interpolate-size: allow-keywords` in
|
|
45
|
+
* `interpolate-size: allow-keywords` in patterns/reveal.css). In Chrome 149 that
|
|
46
46
|
* deadlocks: `content-visibility` stays `hidden`, so the content has no layout,
|
|
47
47
|
* so `auto` resolves to `0`, so the transition has nothing to run — and the
|
|
48
48
|
* disclosure never opens *at all*. Not "opens without animating": every
|
|
@@ -25,8 +25,8 @@ dialog.dialog {
|
|
|
25
25
|
border: var(--_b);
|
|
26
26
|
border-radius: var(--_br);
|
|
27
27
|
box-shadow: var(--_ds);
|
|
28
|
-
background: var(--
|
|
29
|
-
color: var(--
|
|
28
|
+
background: var(--color-bg-surface);
|
|
29
|
+
color: var(--color-text-surface);
|
|
30
30
|
max-block-size: calc(100vh - 2rem);
|
|
31
31
|
|
|
32
32
|
&::backdrop {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
padding: var(--_p);
|
|
16
16
|
border: var(--_b);
|
|
17
17
|
box-shadow: var(--_ds);
|
|
18
|
-
background: var(--
|
|
19
|
-
color: var(--
|
|
18
|
+
background: var(--color-bg-surface);
|
|
19
|
+
color: var(--color-text-surface);
|
|
20
20
|
max-inline-size: none;
|
|
21
21
|
max-block-size: none;
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.form-group__error {
|
|
34
34
|
font-size: var(--form-error-size, 0.75rem);
|
|
35
|
-
color: var(--color-danger
|
|
35
|
+
color: var(--color-text-danger);
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
gap: 0.25rem;
|
|
@@ -87,7 +87,7 @@ fieldset.fieldset,
|
|
|
87
87
|
border: var(--_b);
|
|
88
88
|
border-radius: var(--_br);
|
|
89
89
|
padding: var(--_p);
|
|
90
|
-
background: var(--
|
|
90
|
+
background: var(--color-bg-surface);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/* ── Range + colour controls ───────────────────────────────────────────────── */
|
|
@@ -95,7 +95,7 @@ fieldset.fieldset,
|
|
|
95
95
|
* natively, in both appearances, with no pseudo-element rewriting. The colour
|
|
96
96
|
* swatch only needs its chrome removed so the well fills the control box. */
|
|
97
97
|
input[type='range'] {
|
|
98
|
-
accent-color: var(--range-accent, var(--ui-primary-solid));
|
|
98
|
+
accent-color: var(--range-accent, var(--color-bg-ui-primary-solid));
|
|
99
99
|
inline-size: 100%;
|
|
100
100
|
min-inline-size: 0;
|
|
101
101
|
}
|
|
@@ -202,7 +202,7 @@ input[type='color'] {
|
|
|
202
202
|
block-size: var(--_check-size);
|
|
203
203
|
border: var(--_b);
|
|
204
204
|
border-radius: var(--_br);
|
|
205
|
-
background: var(--
|
|
205
|
+
background: var(--color-bg-surface);
|
|
206
206
|
color: #fff;
|
|
207
207
|
display: flex;
|
|
208
208
|
align-items: center;
|
|
@@ -225,8 +225,8 @@ input[type='color'] {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
input:checked + .custom-check__box {
|
|
228
|
-
background: var(--brand-primary-solid);
|
|
229
|
-
border-color: var(--brand-primary-solid);
|
|
228
|
+
background: var(--color-bg-brand-primary-solid);
|
|
229
|
+
border-color: var(--color-bg-brand-primary-solid);
|
|
230
230
|
|
|
231
231
|
.custom-check__indicator {
|
|
232
232
|
opacity: 1;
|
|
@@ -235,7 +235,7 @@ input[type='color'] {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
input:focus-visible + .custom-check__box {
|
|
238
|
-
outline: 2px solid var(--check-focus-color, var(--color-
|
|
238
|
+
outline: 2px solid var(--check-focus-color, var(--color-border-focus));
|
|
239
239
|
outline-offset: 2px;
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -288,7 +288,7 @@ input[type='color'] {
|
|
|
288
288
|
inline-size: var(--_switch-width);
|
|
289
289
|
block-size: var(--_switch-height);
|
|
290
290
|
border-radius: var(--br-switch-track, var(--br-pill, 999px));
|
|
291
|
-
background: var(--color-surface-muted);
|
|
291
|
+
background: var(--color-bg-surface-muted);
|
|
292
292
|
transition: background-color 0.2s ease;
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -306,7 +306,7 @@ input[type='color'] {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
input:checked + .switch__track {
|
|
309
|
-
background: var(--brand-primary-solid);
|
|
309
|
+
background: var(--color-bg-brand-primary-solid);
|
|
310
310
|
|
|
311
311
|
.switch__thumb {
|
|
312
312
|
inset-inline-start: calc(100% - var(--_switch-thumb-size) - 2px);
|
|
@@ -314,7 +314,7 @@ input[type='color'] {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
input:focus-visible + .switch__track {
|
|
317
|
-
outline: 2px solid var(--switch-focus-color, var(--color-
|
|
317
|
+
outline: 2px solid var(--switch-focus-color, var(--color-border-focus));
|
|
318
318
|
outline-offset: 2px;
|
|
319
319
|
}
|
|
320
320
|
|
|
@@ -360,7 +360,7 @@ select.custom-select {
|
|
|
360
360
|
cursor: pointer;
|
|
361
361
|
|
|
362
362
|
&:focus-visible {
|
|
363
|
-
outline: 2px solid var(--select-focus-color, var(--color-
|
|
363
|
+
outline: 2px solid var(--select-focus-color, var(--color-border-focus));
|
|
364
364
|
outline-offset: 2px;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--_bs: var(--bs, solid);
|
|
10
10
|
border-width: var(--_bw);
|
|
11
11
|
border-style: var(--_bs);
|
|
12
|
-
border-color: var(--bc, var(--
|
|
12
|
+
border-color: var(--bc, var(--color-border-surface, currentColor));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* ── Group — collapse border-radius (+ shared borders) across direct children ─
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
transition: background-color 0.15s ease;
|
|
58
58
|
|
|
59
59
|
&:hover {
|
|
60
|
-
background: var(--color-surface-muted);
|
|
60
|
+
background: var(--color-bg-surface-muted);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&:focus-visible {
|
|
64
|
-
outline: 2px solid var(--icon-button-focus-color, var(--color-
|
|
64
|
+
outline: 2px solid var(--icon-button-focus-color, var(--color-border-focus));
|
|
65
65
|
outline-offset: 2px;
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&.list--divided .list__item + .list__item {
|
|
65
|
-
border-block-start: 1px solid var(--list-divider-color, var(--color-surface-muted));
|
|
65
|
+
border-block-start: 1px solid var(--list-divider-color, var(--color-bg-surface-muted));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&.list--bordered {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
font-size: 0.75em;
|
|
111
111
|
padding: 0.125rem 0.375rem;
|
|
112
112
|
border-radius: var(--br-count, var(--br-pill, 999px));
|
|
113
|
-
background: var(--color-surface-muted);
|
|
113
|
+
background: var(--color-bg-surface-muted);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.facet-list__item--active .facet-list__name {
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
border-radius: var(--_br);
|
|
141
141
|
|
|
142
142
|
&:focus {
|
|
143
|
-
outline: 2px solid var(--filter-focus-color, var(--color-
|
|
143
|
+
outline: 2px solid var(--filter-focus-color, var(--color-border-focus));
|
|
144
144
|
outline-offset: 2px;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
.filtered-list__match {
|
|
186
186
|
padding-inline: 0.125rem;
|
|
187
187
|
border-radius: 0.125rem;
|
|
188
|
-
background: var(--color-warning-muted);
|
|
188
|
+
background: var(--color-bg-warning-muted);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
&:focus-within {
|
|
249
|
-
outline: 2px solid var(--tag-list-focus-color, var(--color-
|
|
249
|
+
outline: 2px solid var(--tag-list-focus-color, var(--color-border-focus));
|
|
250
250
|
outline-offset: 2px;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -13,7 +13,7 @@ nav:has(> .nav-items) {
|
|
|
13
13
|
|
|
14
14
|
.nav-header {
|
|
15
15
|
padding-bottom: 1rem;
|
|
16
|
-
border-bottom: 1px solid var(--nav-border-color, var(--color-surface-muted));
|
|
16
|
+
border-bottom: 1px solid var(--nav-border-color, var(--color-bg-surface-muted));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.nav-items {
|
|
@@ -49,7 +49,7 @@ nav:has(> .nav-items) {
|
|
|
49
49
|
flex-direction: column;
|
|
50
50
|
gap: 1rem;
|
|
51
51
|
padding-top: 1rem;
|
|
52
|
-
border-top: 1px solid var(--nav-border-color, var(--color-surface-muted));
|
|
52
|
+
border-top: 1px solid var(--nav-border-color, var(--color-bg-surface-muted));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/* ── Dropdown submenu ─────────────────────────────────────────────────────── */
|
|
@@ -106,7 +106,7 @@ nav:has(> .nav-items) {
|
|
|
106
106
|
border-radius: 0.375rem;
|
|
107
107
|
|
|
108
108
|
&:hover {
|
|
109
|
-
background-color: var(--color-surface-muted);
|
|
109
|
+
background-color: var(--color-bg-surface-muted);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -131,8 +131,8 @@ nav:has(> .nav-items) {
|
|
|
131
131
|
inset: 0;
|
|
132
132
|
height: 100dvh;
|
|
133
133
|
width: 100%;
|
|
134
|
-
background: var(--
|
|
135
|
-
color: var(--
|
|
134
|
+
background: var(--color-bg-surface);
|
|
135
|
+
color: var(--color-text-surface);
|
|
136
136
|
opacity: 0;
|
|
137
137
|
translate: -100%;
|
|
138
138
|
transition-timing-function: var(--interact-easing, ease);
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
border: var(--_b);
|
|
19
19
|
border-radius: var(--_br);
|
|
20
20
|
box-shadow: var(--_ds);
|
|
21
|
-
background: var(--
|
|
22
|
-
color: var(--
|
|
21
|
+
background: var(--color-bg-surface);
|
|
22
|
+
color: var(--color-text-surface);
|
|
23
23
|
animation: notification-enter 0.3s ease;
|
|
24
24
|
|
|
25
25
|
&.notification--exiting {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
inset-block-end: 0;
|
|
78
78
|
inset-inline: 0;
|
|
79
79
|
block-size: 3px;
|
|
80
|
-
background: var(--brand-primary-solid);
|
|
80
|
+
background: var(--color-bg-brand-primary-solid);
|
|
81
81
|
border-radius: 0 0 var(--_br) var(--_br);
|
|
82
82
|
transform-origin: left;
|
|
83
83
|
animation: notification-progress var(--notification-duration, 5s) linear forwards;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
DISCLOSURE — animatable show/hide (auto ↔ 0), layered by support
|
|
3
|
+
|
|
4
|
+
Lives in `vitops.components` (the default for an unmapped partial), NOT in
|
|
5
|
+
utilities.css where it used to sit. `.reveal` is a container pattern — three
|
|
6
|
+
rules, a state selector and a child contract — and shelving it as a utility
|
|
7
|
+
meant it beat every pattern AND beat the display utilities, so
|
|
8
|
+
`class="reveal hidden"` stayed visible. The tailwind format has always inlined
|
|
9
|
+
it into `@layer components`; this removes the divergence.
|
|
10
|
+
|
|
11
|
+
The ::details-content half of this family is NOT here: patterns/details.css
|
|
12
|
+
owns it. Two copies existed, and the utilities-layer one was winning purely on
|
|
13
|
+
layer, which is how `overflow: clip` beat details.css's `overflow: hidden`.
|
|
14
|
+
|
|
15
|
+
Layer 1 (primary, broadly supported): CSS grid 0fr↔1fr hack. Needs ONE child
|
|
16
|
+
wrapper; the wrapper clips its own content as the track reveals.
|
|
17
|
+
Layer 2 (progressive): interpolate-size + native height:auto animation.
|
|
18
|
+
Layer 3 (native <details>, animating ::details-content): patterns/details.css.
|
|
19
|
+
`.reveal-fade` covers the display:none fade case with the allow-discrete +
|
|
20
|
+
@starting-style idiom (same as nav.css `.drawer-menu`).
|
|
21
|
+
Toggle: consumer sets `.is-open` / `[data-open]` (mirrors .is-active /
|
|
22
|
+
[data-active] in animation.css), OR nests under an [open] element (<details>).
|
|
23
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
24
|
+
:root {
|
|
25
|
+
--reveal-duration: 0.4s;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ── Layer 1: grid-rows hack (primary) ──
|
|
29
|
+
Markup:
|
|
30
|
+
<div class="reveal" id="panel"> <!-- the animated track -->
|
|
31
|
+
<div> … </div> <!-- required single wrapper -->
|
|
32
|
+
</div>
|
|
33
|
+
Toggle .is-open / [data-open] on `.reveal` (JS/Lit), or nest under an [open]
|
|
34
|
+
element (e.g. <details>). The wrapper needs min-height:0 + overflow:hidden so
|
|
35
|
+
the content can be clipped to the 0fr track. */
|
|
36
|
+
.reveal {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-rows: 0fr;
|
|
39
|
+
transition: grid-template-rows var(--reveal-duration) var(--interact-easing, ease);
|
|
40
|
+
}
|
|
41
|
+
.reveal > * {
|
|
42
|
+
min-height: 0;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
}
|
|
45
|
+
.reveal.is-open,
|
|
46
|
+
.reveal[data-open],
|
|
47
|
+
:where([open]) > .reveal {
|
|
48
|
+
grid-template-rows: 1fr;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ── Layer 2: native height:auto animation (progressive enhancement) ──
|
|
52
|
+
Where interpolate-size is supported, animate height directly (no wrapper
|
|
53
|
+
needed). Guarded so unsupported engines keep the grid hack above. */
|
|
54
|
+
@supports (interpolate-size: allow-keywords) {
|
|
55
|
+
:root {
|
|
56
|
+
interpolate-size: allow-keywords;
|
|
57
|
+
}
|
|
58
|
+
.reveal-h {
|
|
59
|
+
height: auto;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
transition: height var(--reveal-duration) var(--interact-easing, ease);
|
|
62
|
+
}
|
|
63
|
+
.reveal-h:not(.is-open):not([data-open]) {
|
|
64
|
+
height: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* ── display:none fade/slide — allow-discrete + @starting-style ──
|
|
69
|
+
Same idiom as nav.css `.drawer-menu`. Base is display:none; the open state
|
|
70
|
+
restores display and fades in, and `display`/`overlay` are transitioned with
|
|
71
|
+
allow-discrete so the element animates out before it is removed. `overlay` is
|
|
72
|
+
a no-op unless the element is in the top layer (popover/dialog) — harmless.
|
|
73
|
+
Markup: <div class="reveal-fade" [data-open]?> … </div> (toggle .is-open) */
|
|
74
|
+
.reveal-fade {
|
|
75
|
+
display: none;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
transition:
|
|
78
|
+
opacity var(--reveal-duration) var(--interact-easing, ease),
|
|
79
|
+
overlay var(--reveal-duration) allow-discrete,
|
|
80
|
+
display var(--reveal-duration) allow-discrete;
|
|
81
|
+
}
|
|
82
|
+
.reveal-fade.is-open,
|
|
83
|
+
.reveal-fade[data-open] {
|
|
84
|
+
display: block;
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
@starting-style {
|
|
88
|
+
.reveal-fade.is-open,
|
|
89
|
+
.reveal-fade[data-open] {
|
|
90
|
+
opacity: 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
|
|
124
124
|
.scroll-progress__bar {
|
|
125
125
|
block-size: 100%;
|
|
126
|
-
background: var(--scroll-progress-color, var(--brand-primary-solid));
|
|
126
|
+
background: var(--scroll-progress-color, var(--color-bg-brand-primary-solid));
|
|
127
127
|
transform-origin: left;
|
|
128
128
|
animation: scroll-progress-grow linear;
|
|
129
129
|
animation-timeline: scroll(root);
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
(deferred.ts) on engines without `scroll-target-group` support. */
|
|
19
19
|
.scroll-target-group a:target-current,
|
|
20
20
|
.scroll-target-group a.is-current {
|
|
21
|
-
color: var(--scroll-target-active-color, var(--brand-primary-solid));
|
|
21
|
+
color: var(--scroll-target-active-color, var(--color-bg-brand-primary-solid));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.scroll-target-group--indicator a {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.scroll-target-group--bar a:target-current::before,
|
|
48
48
|
.scroll-target-group--indicator a.is-current::before,
|
|
49
49
|
.scroll-target-group--bar a.is-current::before {
|
|
50
|
-
background-color: var(--scroll-target-active-color, var(--brand-primary-solid));
|
|
50
|
+
background-color: var(--scroll-target-active-color, var(--color-bg-brand-primary-solid));
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.scroll-target-group--bar a {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
|
|
108
108
|
.toc-sidebar a:target-current,
|
|
109
109
|
.toc-sidebar a.is-current {
|
|
110
|
-
color: var(--scroll-target-active-color, var(--brand-primary-solid));
|
|
110
|
+
color: var(--scroll-target-active-color, var(--color-bg-brand-primary-solid));
|
|
111
111
|
font-weight: 500;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
border-radius: var(--br-control, 0.375rem);
|
|
48
48
|
|
|
49
49
|
&:hover {
|
|
50
|
-
background: var(--color-surface-muted);
|
|
50
|
+
background: var(--color-bg-surface-muted);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&:focus-visible {
|
|
54
|
-
outline: 2px solid var(--sitenav-focus-color, var(--color-
|
|
54
|
+
outline: 2px solid var(--sitenav-focus-color, var(--color-border-focus));
|
|
55
55
|
outline-offset: 2px;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
max-inline-size: 100dvw;
|
|
74
74
|
padding: 1.5rem;
|
|
75
75
|
padding-block-start: 3.5rem; /* clearance for the close button */
|
|
76
|
-
background: var(--
|
|
77
|
-
color: var(--
|
|
76
|
+
background: var(--color-bg-surface);
|
|
77
|
+
color: var(--color-text-surface);
|
|
78
78
|
border: none;
|
|
79
79
|
box-shadow: var(--ds-panel);
|
|
80
80
|
overflow-y: auto;
|
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
border-radius: var(--br-control, 0.375rem);
|
|
150
150
|
|
|
151
151
|
&:hover {
|
|
152
|
-
background: var(--color-surface-muted);
|
|
152
|
+
background: var(--color-bg-surface-muted);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
&:focus-visible {
|
|
156
|
-
outline: 2px solid var(--sitenav-focus-color, var(--color-
|
|
156
|
+
outline: 2px solid var(--sitenav-focus-color, var(--color-border-focus));
|
|
157
157
|
outline-offset: 2px;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -280,8 +280,8 @@
|
|
|
280
280
|
min-inline-size: 13rem;
|
|
281
281
|
padding: 0.5rem;
|
|
282
282
|
overflow: visible;
|
|
283
|
-
background: var(--
|
|
284
|
-
color: var(--
|
|
283
|
+
background: var(--color-bg-surface);
|
|
284
|
+
color: var(--color-text-surface);
|
|
285
285
|
border: var(--b-panel);
|
|
286
286
|
border-radius: var(--br-panel);
|
|
287
287
|
box-shadow: var(--ds-panel);
|
|
@@ -366,8 +366,8 @@
|
|
|
366
366
|
min-inline-size: 13rem;
|
|
367
367
|
padding: 0.5rem;
|
|
368
368
|
overflow: visible;
|
|
369
|
-
background: var(--
|
|
370
|
-
color: var(--
|
|
369
|
+
background: var(--color-bg-surface);
|
|
370
|
+
color: var(--color-text-surface);
|
|
371
371
|
border: var(--b-panel);
|
|
372
372
|
border-radius: var(--br-panel);
|
|
373
373
|
box-shadow: var(--ds-panel);
|
|
@@ -453,8 +453,8 @@
|
|
|
453
453
|
min-inline-size: 13rem;
|
|
454
454
|
padding: 0.5rem;
|
|
455
455
|
overflow: visible;
|
|
456
|
-
background: var(--
|
|
457
|
-
color: var(--
|
|
456
|
+
background: var(--color-bg-surface);
|
|
457
|
+
color: var(--color-text-surface);
|
|
458
458
|
border: var(--b-panel);
|
|
459
459
|
border-radius: var(--br-panel);
|
|
460
460
|
box-shadow: var(--ds-panel);
|
|
@@ -540,8 +540,8 @@
|
|
|
540
540
|
min-inline-size: 13rem;
|
|
541
541
|
padding: 0.5rem;
|
|
542
542
|
overflow: visible;
|
|
543
|
-
background: var(--
|
|
544
|
-
color: var(--
|
|
543
|
+
background: var(--color-bg-surface);
|
|
544
|
+
color: var(--color-text-surface);
|
|
545
545
|
border: var(--b-panel);
|
|
546
546
|
border-radius: var(--br-panel);
|
|
547
547
|
box-shadow: var(--ds-panel);
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
transition: background-color 0.15s ease;
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
background: var(--color-surface-muted);
|
|
41
|
+
background: var(--color-bg-surface-muted);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&:focus-visible {
|
|
45
|
-
outline: 2px solid var(--split-link-focus-color, var(--color-
|
|
45
|
+
outline: 2px solid var(--split-link-focus-color, var(--color-border-focus));
|
|
46
46
|
outline-offset: 2px;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
border: var(--_b);
|
|
72
72
|
border-radius: var(--_br);
|
|
73
73
|
box-shadow: var(--_ds);
|
|
74
|
-
background: var(--
|
|
75
|
-
color: var(--
|
|
74
|
+
background: var(--color-bg-surface);
|
|
75
|
+
color: var(--color-text-surface);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/* Top-layer popover: anchored + placed via position-area. */
|