@slotted/styles 0.1.0-beta.12 → 0.1.0-beta.14
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/package.json +1 -1
- package/src/action-bar/action-bar.css +10 -0
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/alert/alert.css +11 -13
- package/src/chart/chart.css +13 -9
- package/src/combobox/combobox.css +34 -16
- package/src/combobox/combobox.tokens.json +1 -0
- package/src/date-picker/date-picker.css +34 -16
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/drawer/drawer.css +10 -0
- package/src/drawer/drawer.tokens.json +1 -0
- package/src/entity-picker/entity-picker.css +34 -16
- package/src/entity-picker/entity-picker.tokens.json +1 -0
- package/src/icon/icon.css +43 -0
- package/src/inline-message/inline-message.css +105 -53
- package/src/kbd/kbd.css +18 -10
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/menu/menu.css +34 -11
- package/src/menu/menu.tokens.json +1 -0
- package/src/multi-select/multi-select.css +24 -16
- package/src/popover/popover.css +34 -13
- package/src/popover/popover.tokens.json +1 -0
- package/src/section/section.css +14 -2
- package/src/section/section.tokens.json +1 -0
- package/src/select/select.css +34 -16
- package/src/select/select.tokens.json +1 -0
- package/src/status-indicator/status-indicator.css +84 -59
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/table-of-contents/table-of-contents.css +6 -2
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/toast/toast.css +7 -8
- package/src/tooltip/tooltip.css +34 -13
- package/src/tooltip/tooltip.tokens.json +1 -0
|
@@ -11,14 +11,18 @@
|
|
|
11
11
|
* message with nothing around it, so it inherits the rhythm of whatever
|
|
12
12
|
* placed it — a field, a `Stack`, a table cell.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* Three facts the layout rests on:
|
|
15
15
|
*
|
|
16
|
-
* - The mark is
|
|
17
|
-
*
|
|
16
|
+
* - The mark is inside the first line, not in a column beside it: an
|
|
17
|
+
* `inline-flex` box before the sentence, so it is on that line at every
|
|
18
|
+
* wrap, font, zoom and baseline a parent aligns to.
|
|
19
|
+
* - The lines after the first hang: the root is padded by the mark and its
|
|
20
|
+
* gap and the first line indented back by the same, so a sentence that
|
|
21
|
+
* wraps continues under its own first word, never under the mark.
|
|
18
22
|
* - The severity word is out of flow. It is a real element with real text,
|
|
19
23
|
* clipped by the WCAG 2.2 technique C7 rule set and placed first in the
|
|
20
24
|
* DOM so it is read first; `position: absolute` is what keeps it from
|
|
21
|
-
*
|
|
25
|
+
* adding a line.
|
|
22
26
|
*/
|
|
23
27
|
[data-ui-inline-message][data-part-root] {
|
|
24
28
|
/**
|
|
@@ -39,13 +43,15 @@
|
|
|
39
43
|
* line, and this box holds a sentence.
|
|
40
44
|
*
|
|
41
45
|
* The mark is the sentence's own size (R5), the rule `alert` draws its
|
|
42
|
-
* mark with
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
+
* mark with, rounded to an even pixel so its centre lands on a whole one:
|
|
47
|
+
* 12 pixels beside 12-pixel type, 14 beside 13. The status glyphs are
|
|
48
|
+
* drawn on those two grids (`@slotted/core/glyph`), so every cut of the
|
|
49
|
+
* symbol is on a device pixel. A fourteen-pixel Lucide glyph reduced to
|
|
50
|
+
* twelve-pixel type was two pixels taller than the capitals it stood
|
|
51
|
+
* next to; a drawing made for the size has no such reduction.
|
|
46
52
|
*/
|
|
47
53
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
48
|
-
--_mark-size: 1em;
|
|
54
|
+
--_mark-size: round(nearest, 1em, 2px);
|
|
49
55
|
/**
|
|
50
56
|
* The distance from the mark to its own sentence: eight pixels, the step
|
|
51
57
|
* `alert` uses (R5). It does not step with the size — the mark already
|
|
@@ -53,27 +59,43 @@
|
|
|
53
59
|
* the two apart twice.
|
|
54
60
|
*/
|
|
55
61
|
--_column-gap: var(--slotted-inline-message-column-gap, var(--slotted-space-4, 0.5rem));
|
|
62
|
+
/* What the first line gives back to the mark. Zero wherever no mark is drawn. */
|
|
63
|
+
--_indent: calc(var(--_mark-size) + var(--_column-gap));
|
|
56
64
|
|
|
57
65
|
color: var(--_text);
|
|
58
|
-
|
|
59
|
-
* Two columns, both placed explicitly. Auto-placement would drop the
|
|
60
|
-
* sentence into the first column whenever the message has no mark, and the
|
|
61
|
-
* sentence would then be sized by a track that shrinks to its content
|
|
62
|
-
* with an empty `1fr` beside it.
|
|
63
|
-
*/
|
|
64
|
-
display: grid;
|
|
66
|
+
display: block;
|
|
65
67
|
font-family: var(
|
|
66
68
|
--slotted-inline-message-font-family,
|
|
67
69
|
var(--slotted-control-font-family, sans-serif)
|
|
68
70
|
);
|
|
69
71
|
font-size: var(--_font-size);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The leading, rounded up to an even pixel: 13 × 1.5 is 19.5 and lands
|
|
74
|
+
* every line, and the mark centred on it, across two device pixels. 20
|
|
75
|
+
* and 18 leave a whole pixel of half-leading on each side.
|
|
76
|
+
*/
|
|
77
|
+
line-height: round(
|
|
78
|
+
up,
|
|
79
|
+
1em * var(--slotted-inline-message-line-height, var(--slotted-line-height-md, 1.5)),
|
|
80
|
+
2px
|
|
81
|
+
);
|
|
72
82
|
/* A `p` arrives with the user agent's block margins; the distance between a
|
|
73
83
|
control and its message belongs to whatever placed the two. */
|
|
74
84
|
margin: 0;
|
|
85
|
+
/* A sentence longer than this is two sentences. */
|
|
86
|
+
max-inline-size: 68ch;
|
|
87
|
+
padding-inline-start: var(--_indent);
|
|
75
88
|
/* The containing block for the clipped severity word. */
|
|
76
89
|
position: relative;
|
|
90
|
+
text-indent: calc(-1 * var(--_indent));
|
|
91
|
+
/**
|
|
92
|
+
* The box runs from the capitals of the first line to the baseline of the
|
|
93
|
+
* last, so whatever placed the message measures its distance to the type
|
|
94
|
+
* rather than to the half-leading around it: the field's six-pixel row gap
|
|
95
|
+
* is six pixels from the control to the capitals.
|
|
96
|
+
*/
|
|
97
|
+
text-box: trim-both cap alphabetic;
|
|
98
|
+
text-wrap: pretty;
|
|
77
99
|
}
|
|
78
100
|
|
|
79
101
|
/* ── Tone: what the message is about ──────────────────────────────────
|
|
@@ -132,10 +154,11 @@
|
|
|
132
154
|
}
|
|
133
155
|
|
|
134
156
|
/**
|
|
135
|
-
* The line held open for a message that has not arrived
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
157
|
+
* The line held open for a message that has not arrived: one line of the
|
|
158
|
+
* family's own type, so it follows the size step and the density rather than
|
|
159
|
+
* a number — and an application renders the message unconditionally without
|
|
160
|
+
* the field below it moving when the error appears. Where the box is trimmed
|
|
161
|
+
* to the capitals, one line of it is `1cap` tall, and so is the reserve.
|
|
139
162
|
*
|
|
140
163
|
* Material UI reserves the same line by asking the consumer to pass a space
|
|
141
164
|
* character as the message. A space is content: it defeats `:empty` below, so
|
|
@@ -145,6 +168,12 @@
|
|
|
145
168
|
min-block-size: 1lh;
|
|
146
169
|
}
|
|
147
170
|
|
|
171
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
172
|
+
[data-ui-inline-message][data-part-root][data-reserve] {
|
|
173
|
+
min-block-size: 1cap;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
148
177
|
/* ── The severity, in words ───────────────────────────────────────────
|
|
149
178
|
*
|
|
150
179
|
* The defect this family exists to fix. A reader who cannot see the message
|
|
@@ -174,33 +203,41 @@
|
|
|
174
203
|
|
|
175
204
|
/* ── The mark ─────────────────────────────────────────────────────────
|
|
176
205
|
*
|
|
177
|
-
* A square the sentence's own size, on its first line (R5)
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* how, and it stays there when the sentence wraps to three.
|
|
206
|
+
* A square the sentence's own size, on its first line (R5). Its centre is
|
|
207
|
+
* the centre of the capitals, `0.5cap` above the baseline — the axis
|
|
208
|
+
* `[data-ui-icon]` aligns every icon on — so the mark sits on the words
|
|
209
|
+
* rather than on the line box around them, and stays there when the
|
|
210
|
+
* sentence wraps to three. The offset is rounded to the device pixel: half
|
|
211
|
+
* a pixel at 2×, a whole one below 1.5×.
|
|
184
212
|
*
|
|
185
213
|
* The glyph is the binding's `Glyph` in an `icon` box, chosen from the tone
|
|
186
|
-
* and
|
|
187
|
-
* A mark the page supplies instead takes the same box
|
|
188
|
-
*
|
|
214
|
+
* and filled in `currentcolor`; the slot sizes it through the icon token.
|
|
215
|
+
* A mark the page supplies instead takes the same box, centred in it.
|
|
216
|
+
*
|
|
217
|
+
* `text-indent` is inherited, and the root's is negative: every box the
|
|
218
|
+
* message holds takes it back.
|
|
189
219
|
*/
|
|
190
220
|
[data-ui-inline-message] > [data-part-icon] {
|
|
191
221
|
--slotted-icon-size: var(--_mark-size);
|
|
192
222
|
|
|
193
223
|
align-items: center;
|
|
194
|
-
align-self: start;
|
|
195
224
|
block-size: var(--_mark-size);
|
|
196
225
|
box-sizing: border-box;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
226
|
+
/* The box's baseline is its own bottom edge, never the baseline of what it
|
|
227
|
+
holds: a dot glyph shorter than the box lowered the box by the difference. */
|
|
228
|
+
contain: layout;
|
|
229
|
+
display: inline-flex;
|
|
200
230
|
inline-size: var(--_mark-size);
|
|
201
231
|
justify-content: center;
|
|
202
|
-
margin-block-start: calc((1lh - var(--_mark-size)) / 2);
|
|
203
232
|
margin-inline-end: var(--_column-gap);
|
|
233
|
+
text-indent: 0;
|
|
234
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 0.5px);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (max-resolution: 1.49dppx) {
|
|
238
|
+
[data-ui-inline-message] > [data-part-icon] {
|
|
239
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 1px);
|
|
240
|
+
}
|
|
204
241
|
}
|
|
205
242
|
|
|
206
243
|
/**
|
|
@@ -213,8 +250,8 @@
|
|
|
213
250
|
* changes between them. `field` asked for it once and no longer does (F1):
|
|
214
251
|
* help under a field draws no mark, and an error draws the tone's own.
|
|
215
252
|
*
|
|
216
|
-
* The disc is a third of the mark
|
|
217
|
-
* steps
|
|
253
|
+
* The disc is a third of the mark rounded to an even pixel — 4 pixels at
|
|
254
|
+
* both steps — so its centre is on a whole pixel like every other mark. The
|
|
218
255
|
* slot is the disc's own width and the glyph's box is twice that, because
|
|
219
256
|
* the `dot` glyph draws a circle half the width of its own viewBox: at twice
|
|
220
257
|
* the slot the disc fills the slot exactly, the box overhanging it equally
|
|
@@ -226,7 +263,13 @@
|
|
|
226
263
|
* measured for.
|
|
227
264
|
*/
|
|
228
265
|
[data-ui-inline-message][data-part-root][data-mark='dot'] {
|
|
229
|
-
--_dot-size:
|
|
266
|
+
--_dot-size: round(nearest, var(--_mark-size) / 3, 2px);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
[data-ui-inline-message][data-part-root][data-mark='dot']:has(
|
|
270
|
+
> [data-part-icon] > [data-ui-icon] > [data-glyph='dot']
|
|
271
|
+
) {
|
|
272
|
+
--_indent: calc(var(--_dot-size) + var(--_column-gap));
|
|
230
273
|
}
|
|
231
274
|
|
|
232
275
|
[data-ui-inline-message][data-mark='dot']
|
|
@@ -251,6 +294,22 @@
|
|
|
251
294
|
display: none;
|
|
252
295
|
}
|
|
253
296
|
|
|
297
|
+
/**
|
|
298
|
+
* A withdrawn mark gives its indent back, under every condition that
|
|
299
|
+
* withdraws it: none drawn, help's empty box, `mark='none'`, and nothing to
|
|
300
|
+
* say.
|
|
301
|
+
*/
|
|
302
|
+
[data-ui-inline-message][data-part-root]:not(:has(> [data-part-icon])),
|
|
303
|
+
[data-ui-inline-message][data-part-root][data-tone='secondary']:not([data-loading]):not(
|
|
304
|
+
[data-mark='dot']
|
|
305
|
+
):has(> [data-part-icon]:empty),
|
|
306
|
+
[data-ui-inline-message][data-part-root][data-mark='none']:not([data-loading]):has(
|
|
307
|
+
> [data-part-icon]:empty
|
|
308
|
+
),
|
|
309
|
+
[data-ui-inline-message][data-part-root]:has([data-part-text]:empty) {
|
|
310
|
+
--_indent: 0px;
|
|
311
|
+
}
|
|
312
|
+
|
|
254
313
|
/**
|
|
255
314
|
* ── No mark at all ────────────────────────────────────────────────────
|
|
256
315
|
*
|
|
@@ -274,9 +333,8 @@
|
|
|
274
333
|
/* ── The sentence ─────────────────────────────────────────────────────
|
|
275
334
|
*
|
|
276
335
|
* Written by the family around the consumer's content rather than by the
|
|
277
|
-
* consumer
|
|
278
|
-
*
|
|
279
|
-
* below is an exact question in both bindings.
|
|
336
|
+
* consumer, so `:empty` below is an exact question in both bindings. It is
|
|
337
|
+
* inline: a link inside it wraps with the words around it.
|
|
280
338
|
*
|
|
281
339
|
* `overflow-wrap: anywhere` breaks the one string a field message is likeliest
|
|
282
340
|
* to carry that no language can break — a token, a container digest, a host
|
|
@@ -284,15 +342,13 @@
|
|
|
284
342
|
* DOM, in the accessibility tree, and findable by a page search.
|
|
285
343
|
*/
|
|
286
344
|
[data-ui-inline-message] > [data-part-text] {
|
|
287
|
-
grid-column: 2;
|
|
288
|
-
grid-row: 1;
|
|
289
|
-
min-inline-size: 0;
|
|
290
345
|
overflow-wrap: anywhere;
|
|
346
|
+
text-indent: 0;
|
|
291
347
|
}
|
|
292
348
|
|
|
293
349
|
/**
|
|
294
350
|
* The answers the message offers — "R$ 2,00 · R$ 15,00" under an amount that
|
|
295
|
-
* could be either. They wrap under the sentence,
|
|
351
|
+
* could be either. They wrap under the sentence, on its indent, at the gap
|
|
296
352
|
* the family puts between its mark and its sentence; the root is then a
|
|
297
353
|
* group named by the sentence, so a reader hears what the buttons answer.
|
|
298
354
|
*/
|
|
@@ -301,13 +357,11 @@
|
|
|
301
357
|
display: flex;
|
|
302
358
|
flex-wrap: wrap;
|
|
303
359
|
gap: var(--slotted-inline-message-actions-gap, var(--_column-gap));
|
|
304
|
-
grid-column: 2;
|
|
305
|
-
grid-row: 2;
|
|
306
360
|
margin-block-start: var(
|
|
307
361
|
--slotted-inline-message-actions-offset,
|
|
308
362
|
var(--slotted-space-2, 0.25rem)
|
|
309
363
|
);
|
|
310
|
-
|
|
364
|
+
text-indent: 0;
|
|
311
365
|
}
|
|
312
366
|
|
|
313
367
|
/**
|
|
@@ -342,13 +396,11 @@
|
|
|
342
396
|
directions. */
|
|
343
397
|
border-inline-end-color: transparent;
|
|
344
398
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
345
|
-
|
|
346
|
-
/* Restated for the bullet: a ring drawn in a column sized for a 4-pixel
|
|
399
|
+
/* Restated for the bullet: a ring drawn in a box sized for a 4-pixel
|
|
347
400
|
dot is an ellipse. The text moves by the difference for as long as the
|
|
348
401
|
message is waiting, which is the cost of a bullet that starts at the
|
|
349
402
|
message's own left edge. */
|
|
350
403
|
inline-size: var(--_mark-size);
|
|
351
|
-
margin-block-start: calc((1lh - var(--_mark-size)) / 2);
|
|
352
404
|
}
|
|
353
405
|
|
|
354
406
|
/* The page's own artwork withdraws for the ring rather than sitting inside
|
package/src/kbd/kbd.css
CHANGED
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
--_block-size: var(--slotted-control-inner-size, var(--_size));
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
+
* `--slotted-kbd-surface`, `--slotted-kbd-border-color` and
|
|
63
|
+
* `--slotted-kbd-color` are the family's own handle on its ground, rim and
|
|
64
|
+
* ink: a theme that re-tints the tone tokens inside a region (a translucent
|
|
65
|
+
* glass scope) sets them to keep a key cap opaque, while the tone tokens
|
|
66
|
+
* keep driving buttons and the other families. `outline` and `plain` own
|
|
67
|
+
* no ground, so they read the rim and the ink, and `plain` only the ink.
|
|
68
|
+
*
|
|
62
69
|
* The ground, the rim and the ink. `raised` is the default: the rim a
|
|
63
70
|
* control draws on three sides, and `--slotted-border-strong` below, the
|
|
64
71
|
* one border token the theme holds to 3:1 against the surface. The strong
|
|
@@ -66,11 +73,11 @@
|
|
|
66
73
|
* it is the shadow a key casts, and it is still the signal that says the
|
|
67
74
|
* word inside is a key.
|
|
68
75
|
*/
|
|
69
|
-
--_background: var(--slotted-surface-raised, Canvas);
|
|
76
|
+
--_background: var(--slotted-kbd-surface, var(--slotted-surface-raised, Canvas));
|
|
70
77
|
--_face: none;
|
|
71
|
-
--_border: var(--slotted-control-border-color, ButtonBorder);
|
|
78
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-control-border-color, ButtonBorder));
|
|
72
79
|
--_base: var(--slotted-border-strong, ButtonBorder);
|
|
73
|
-
--_color: var(--slotted-text, CanvasText);
|
|
80
|
+
--_color: var(--slotted-kbd-color, var(--slotted-text, CanvasText));
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
[data-ui-kbd][data-part-root] {
|
|
@@ -397,8 +404,9 @@
|
|
|
397
404
|
[data-ui-kbd][data-variant='outline'] {
|
|
398
405
|
--_background: transparent;
|
|
399
406
|
/* The edge is all this variant draws, so it is the strong one all round. */
|
|
400
|
-
--_border: var(--slotted-border-strong, ButtonBorder);
|
|
401
|
-
--
|
|
407
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-border-strong, ButtonBorder));
|
|
408
|
+
--_base: var(--_border);
|
|
409
|
+
--_color: var(--slotted-kbd-color, inherit);
|
|
402
410
|
}
|
|
403
411
|
|
|
404
412
|
/**
|
|
@@ -408,7 +416,7 @@
|
|
|
408
416
|
* surface is the step `badge` calibrated to read on both.
|
|
409
417
|
*/
|
|
410
418
|
[data-ui-kbd][data-variant='soft'] {
|
|
411
|
-
--_background: var(--slotted-tone-secondary-surface);
|
|
419
|
+
--_background: var(--slotted-kbd-surface, var(--slotted-tone-secondary-surface));
|
|
412
420
|
/**
|
|
413
421
|
* The tinted key draws the tone's own edge, as every `badge` variant does,
|
|
414
422
|
* and it is not decoration here either. In the `high-contrast` scheme the
|
|
@@ -417,9 +425,9 @@
|
|
|
417
425
|
* edge is also what carries it through forced colours, where the ground
|
|
418
426
|
* flattens to `Canvas` for the same reason.
|
|
419
427
|
*/
|
|
420
|
-
--_border: var(--slotted-tone-secondary-border);
|
|
421
|
-
--_base: var(--
|
|
422
|
-
--_color: var(--slotted-tone-secondary-text);
|
|
428
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-tone-secondary-border));
|
|
429
|
+
--_base: var(--_border);
|
|
430
|
+
--_color: var(--slotted-kbd-color, var(--slotted-tone-secondary-text));
|
|
423
431
|
}
|
|
424
432
|
|
|
425
433
|
/**
|
|
@@ -439,7 +447,7 @@
|
|
|
439
447
|
--_background: transparent;
|
|
440
448
|
--_border: transparent;
|
|
441
449
|
--_base: transparent;
|
|
442
|
-
--_color: inherit;
|
|
450
|
+
--_color: var(--slotted-kbd-color, inherit);
|
|
443
451
|
}
|
|
444
452
|
|
|
445
453
|
[data-ui-kbd][data-part-root][data-variant='plain'] {
|
package/src/kbd/kbd.tokens.json
CHANGED
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
"--slotted-font-family-sans",
|
|
17
17
|
"--slotted-font-weight-medium",
|
|
18
18
|
"--slotted-kbd-base-width",
|
|
19
|
+
"--slotted-kbd-border-color",
|
|
19
20
|
"--slotted-kbd-border-width",
|
|
21
|
+
"--slotted-kbd-color",
|
|
20
22
|
"--slotted-kbd-font-family",
|
|
21
23
|
"--slotted-kbd-font-weight",
|
|
22
24
|
"--slotted-kbd-radius",
|
|
25
|
+
"--slotted-kbd-surface",
|
|
23
26
|
"--slotted-kbd-symbol-font-family",
|
|
24
27
|
"--slotted-radius-lg",
|
|
25
28
|
"--slotted-radius-md",
|
package/src/menu/menu.css
CHANGED
|
@@ -162,7 +162,6 @@
|
|
|
162
162
|
pointer, and the frame must not swallow a press meant for the page. */
|
|
163
163
|
pointer-events: none;
|
|
164
164
|
|
|
165
|
-
opacity: 0;
|
|
166
165
|
/**
|
|
167
166
|
* R7: the layer arrives along the axis it opens on — from one space step
|
|
168
167
|
* above its place when it opens downward, from one step below when it
|
|
@@ -172,9 +171,7 @@
|
|
|
172
171
|
*/
|
|
173
172
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
174
173
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
175
|
-
transition:
|
|
176
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
177
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
174
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
178
175
|
}
|
|
179
176
|
|
|
180
177
|
[data-ui-menu][data-side='top'] {
|
|
@@ -206,7 +203,6 @@
|
|
|
206
203
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
207
204
|
*/
|
|
208
205
|
[data-ui-menu][data-open] {
|
|
209
|
-
opacity: 1;
|
|
210
206
|
translate: 0 0;
|
|
211
207
|
transition: none;
|
|
212
208
|
}
|
|
@@ -234,28 +230,24 @@
|
|
|
234
230
|
|
|
235
231
|
@keyframes slotted-menu-enter-down {
|
|
236
232
|
from {
|
|
237
|
-
opacity: 0;
|
|
238
233
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
239
234
|
}
|
|
240
235
|
}
|
|
241
236
|
|
|
242
237
|
@keyframes slotted-menu-enter-up {
|
|
243
238
|
from {
|
|
244
|
-
opacity: 0;
|
|
245
239
|
translate: 0 var(--_enter-distance);
|
|
246
240
|
}
|
|
247
241
|
}
|
|
248
242
|
|
|
249
243
|
@keyframes slotted-menu-enter-from-start {
|
|
250
244
|
from {
|
|
251
|
-
opacity: 0;
|
|
252
245
|
translate: calc(-1 * var(--_enter-distance)) 0;
|
|
253
246
|
}
|
|
254
247
|
}
|
|
255
248
|
|
|
256
249
|
@keyframes slotted-menu-enter-from-end {
|
|
257
250
|
from {
|
|
258
|
-
opacity: 0;
|
|
259
251
|
translate: var(--_enter-distance) 0;
|
|
260
252
|
}
|
|
261
253
|
}
|
|
@@ -266,6 +258,27 @@
|
|
|
266
258
|
}
|
|
267
259
|
}
|
|
268
260
|
|
|
261
|
+
/**
|
|
262
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
263
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
264
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
265
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
266
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
267
|
+
*/
|
|
268
|
+
[data-ui-menu] > [data-part-content] {
|
|
269
|
+
opacity: 0;
|
|
270
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
[data-ui-menu][data-open] > [data-part-content] {
|
|
274
|
+
opacity: 1;
|
|
275
|
+
transition: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
[data-ui-menu][data-open][data-positioned] > [data-part-content] {
|
|
279
|
+
animation: slotted-menu-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
280
|
+
}
|
|
281
|
+
|
|
269
282
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
270
283
|
@media (prefers-reduced-motion: reduce) {
|
|
271
284
|
[data-ui-menu],
|
|
@@ -273,14 +286,14 @@
|
|
|
273
286
|
[data-ui-menu][data-side='left'],
|
|
274
287
|
[data-ui-menu][data-side='right'] {
|
|
275
288
|
translate: 0 0;
|
|
276
|
-
transition:
|
|
289
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
277
290
|
}
|
|
278
291
|
|
|
279
292
|
[data-ui-menu][data-open][data-positioned],
|
|
280
293
|
[data-ui-menu][data-open][data-positioned][data-side='top'],
|
|
281
294
|
[data-ui-menu][data-open][data-positioned][data-side='left'],
|
|
282
295
|
[data-ui-menu][data-open][data-positioned][data-side='right'] {
|
|
283
|
-
animation-name:
|
|
296
|
+
animation-name: none;
|
|
284
297
|
}
|
|
285
298
|
}
|
|
286
299
|
|
|
@@ -359,6 +372,16 @@
|
|
|
359
372
|
padding-block: var(--_inset-block);
|
|
360
373
|
padding-inline: var(--_inset-inline);
|
|
361
374
|
pointer-events: auto;
|
|
375
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
376
|
+
-webkit-backdrop-filter: var(--slotted-menu-backdrop-filter, none);
|
|
377
|
+
backdrop-filter: var(--slotted-menu-backdrop-filter, none);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
381
|
+
[data-ui-menu] > [data-part-content] {
|
|
382
|
+
-webkit-backdrop-filter: none;
|
|
383
|
+
backdrop-filter: none;
|
|
384
|
+
}
|
|
362
385
|
}
|
|
363
386
|
|
|
364
387
|
/**
|
|
@@ -907,7 +907,6 @@
|
|
|
907
907
|
box-sizing: border-box;
|
|
908
908
|
pointer-events: none;
|
|
909
909
|
|
|
910
|
-
opacity: 0;
|
|
911
910
|
/**
|
|
912
911
|
* The layer arrives along the axis it opens on — from one space step above
|
|
913
912
|
* its place when it opens downward, from one step below when it opens
|
|
@@ -917,9 +916,7 @@
|
|
|
917
916
|
*/
|
|
918
917
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
919
918
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
920
|
-
transition:
|
|
921
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
922
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
919
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
923
920
|
}
|
|
924
921
|
|
|
925
922
|
[data-ui-multi-select][data-part-positioner][data-side='top'] {
|
|
@@ -940,7 +937,6 @@
|
|
|
940
937
|
* it leaves from wherever the layer is, on the closed rule's durations.
|
|
941
938
|
*/
|
|
942
939
|
[data-ui-multi-select][data-part-positioner][data-open] {
|
|
943
|
-
opacity: 1;
|
|
944
940
|
translate: 0 0;
|
|
945
941
|
transition: none;
|
|
946
942
|
}
|
|
@@ -959,23 +955,14 @@
|
|
|
959
955
|
animation-name: slotted-multi-select-enter-up;
|
|
960
956
|
}
|
|
961
957
|
|
|
962
|
-
[data-ui-multi-select][data-part-positioner][data-open][data-positioned]:is(
|
|
963
|
-
[data-side='left'],
|
|
964
|
-
[data-side='right']
|
|
965
|
-
) {
|
|
966
|
-
animation-name: slotted-multi-select-fade;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
958
|
@keyframes slotted-multi-select-enter-down {
|
|
970
959
|
from {
|
|
971
|
-
opacity: 0;
|
|
972
960
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
973
961
|
}
|
|
974
962
|
}
|
|
975
963
|
|
|
976
964
|
@keyframes slotted-multi-select-enter-up {
|
|
977
965
|
from {
|
|
978
|
-
opacity: 0;
|
|
979
966
|
translate: 0 var(--_enter-distance);
|
|
980
967
|
}
|
|
981
968
|
}
|
|
@@ -986,6 +973,27 @@
|
|
|
986
973
|
}
|
|
987
974
|
}
|
|
988
975
|
|
|
976
|
+
/**
|
|
977
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
978
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
979
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
980
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
981
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
982
|
+
*/
|
|
983
|
+
[data-ui-multi-select][data-part-positioner] > [data-part-content] {
|
|
984
|
+
opacity: 0;
|
|
985
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
[data-ui-multi-select][data-part-positioner][data-open] > [data-part-content] {
|
|
989
|
+
opacity: 1;
|
|
990
|
+
transition: none;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
[data-ui-multi-select][data-part-positioner][data-open][data-positioned] > [data-part-content] {
|
|
994
|
+
animation: slotted-multi-select-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
995
|
+
}
|
|
996
|
+
|
|
989
997
|
/* Stillness keeps the fade and drops the movement. */
|
|
990
998
|
@media (prefers-reduced-motion: reduce) {
|
|
991
999
|
[data-ui-multi-select][data-part-positioner],
|
|
@@ -993,14 +1001,14 @@
|
|
|
993
1001
|
[data-ui-multi-select][data-part-positioner][data-side='left'],
|
|
994
1002
|
[data-ui-multi-select][data-part-positioner][data-side='right'] {
|
|
995
1003
|
translate: 0 0;
|
|
996
|
-
transition:
|
|
1004
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
997
1005
|
}
|
|
998
1006
|
|
|
999
1007
|
[data-ui-multi-select][data-part-positioner][data-open][data-positioned],
|
|
1000
1008
|
[data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
1001
1009
|
[data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
1002
1010
|
[data-ui-multi-select][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
1003
|
-
animation-name:
|
|
1011
|
+
animation-name: none;
|
|
1004
1012
|
}
|
|
1005
1013
|
}
|
|
1006
1014
|
|