@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
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 +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/drawer/drawer.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
* The resizer is a four-pixel gutter whose pointer reach is
|
|
29
29
|
* `--slotted-target-min`, the WCAG 2.2 floor, drawn by a transparent
|
|
30
|
-
* pseudo-element
|
|
30
|
+
* pseudo-element centerd on it; it is a row of the panel's grid on a block
|
|
31
31
|
* side and an overlay on its inner edge on an inline side. The section that draws it says why the two
|
|
32
32
|
* differ; in one sentence, every rule in this panel runs across the inline
|
|
33
33
|
* axis, and a column would cut all of them.
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* a drawer is the ordinary case, and a descendant rule would paint the inner
|
|
37
37
|
* panel with the outer panel's geometry.
|
|
38
38
|
*/
|
|
39
|
-
[data-ui
|
|
39
|
+
[data-ui-drawer] {
|
|
40
40
|
/**
|
|
41
41
|
* The panel's resting measure, per size step. Five named steps rather than
|
|
42
42
|
* the pixel string Ant and MUI both take: a theme retunes a step and cannot
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
/**
|
|
48
48
|
* What the panel actually measures. `--slotted-drawer-extent` is the one
|
|
49
49
|
* name for it, and it is read from two places: an application setting one
|
|
50
|
-
* measure for every drawer writes it on `[data-ui
|
|
50
|
+
* measure for every drawer writes it on `[data-ui-drawer]`, and the
|
|
51
51
|
* binding writes the length the reader dragged to as an inline custom
|
|
52
52
|
* property on this element. Both are lengths, so the cascade decides
|
|
53
53
|
* between them the way it decides everything else.
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
* of nothing at rest, a two-pixel line under the hand, and a reach the
|
|
83
83
|
* pointer finds without the eye being told where it is.
|
|
84
84
|
*
|
|
85
|
-
* `--_resizer-reach` is the WCAG 2.2 floor and it is
|
|
85
|
+
* `--_resizer-reach` is the WCAG 2.2 floor and it is centerd on the
|
|
86
86
|
* gutter, so it takes ten pixels from each side rather than twenty from
|
|
87
87
|
* the panel — which is what keeps it off the header of a sheet.
|
|
88
88
|
*/
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
* showed it.
|
|
99
99
|
*
|
|
100
100
|
* It is `splitter`'s track, because the two families draw one picture and a
|
|
101
|
-
* picture is a geometry as much as a
|
|
101
|
+
* picture is a geometry as much as a color. The panel's rows already read
|
|
102
102
|
* this through `max(--_padding-inline, --_resizer-thickness)`, so widening
|
|
103
103
|
* it moves nothing else.
|
|
104
104
|
*/
|
|
@@ -117,6 +117,11 @@
|
|
|
117
117
|
* the motion scale arriving and one step down leaving, because a reader who
|
|
118
118
|
* has decided to close is waiting.
|
|
119
119
|
*
|
|
120
|
+
* The slide arrives on the standard curve, not the entrance one: the
|
|
121
|
+
* entrance curve starts at fourteen times its mean speed, and a bottom
|
|
122
|
+
* sheet on it covered 46 per cent of a 717 px travel in its first frame.
|
|
123
|
+
* The standard curve covers under 3 per cent there.
|
|
124
|
+
*
|
|
120
125
|
* `--_move` is any measure that changes — an inline drawer opening, and a
|
|
121
126
|
* separator released onto a snap point. One step below the slide.
|
|
122
127
|
*
|
|
@@ -136,7 +141,8 @@
|
|
|
136
141
|
* decide. A property is resolved on the element instead, and the three
|
|
137
142
|
* states below read as what they are.
|
|
138
143
|
*/
|
|
139
|
-
--_slide: var(--slotted-duration
|
|
144
|
+
--_slide: var(--slotted-drawer-slide-duration, var(--slotted-duration-long))
|
|
145
|
+
var(--slotted-drawer-slide-easing, var(--slotted-easing-standard));
|
|
140
146
|
--_move: var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
141
147
|
/**
|
|
142
148
|
* `allow-discrete` is the whole of it. Without it the rule that hides a
|
|
@@ -155,7 +161,8 @@
|
|
|
155
161
|
* it had finished leaving — which is a hundred and fifty milliseconds
|
|
156
162
|
* before `closed` fires.
|
|
157
163
|
*/
|
|
158
|
-
--_reveal: content-visibility
|
|
164
|
+
--_reveal: content-visibility
|
|
165
|
+
var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium)) allow-discrete;
|
|
159
166
|
|
|
160
167
|
/**
|
|
161
168
|
* The repository has no global reset, so a family that gives a box an
|
|
@@ -176,8 +183,9 @@
|
|
|
176
183
|
}
|
|
177
184
|
|
|
178
185
|
/** Leaving is shorter than arriving: a reader who has decided is waiting. */
|
|
179
|
-
[data-ui
|
|
180
|
-
--_slide: var(--slotted-duration
|
|
186
|
+
[data-ui-drawer]:not([data-open]) {
|
|
187
|
+
--_slide: var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium))
|
|
188
|
+
var(--slotted-drawer-slide-exit-easing, var(--slotted-easing-exit));
|
|
181
189
|
--_move: var(--slotted-duration-medium) var(--slotted-easing-exit);
|
|
182
190
|
}
|
|
183
191
|
|
|
@@ -186,27 +194,27 @@
|
|
|
186
194
|
* every pointer position would lag the hand by the whole duration, and a
|
|
187
195
|
* bottom sheet the reader is pulling has to follow it.
|
|
188
196
|
*/
|
|
189
|
-
[data-ui
|
|
197
|
+
[data-ui-drawer][data-dragging] {
|
|
190
198
|
--_move: var(--slotted-duration-instant) var(--slotted-easing-standard);
|
|
191
199
|
}
|
|
192
200
|
|
|
193
|
-
[data-ui
|
|
201
|
+
[data-ui-drawer][data-size='sm'] {
|
|
194
202
|
--_step: var(--slotted-drawer-extent-sm, 18rem);
|
|
195
203
|
--_padding-inline: var(--slotted-space-6, 1rem);
|
|
196
204
|
}
|
|
197
205
|
|
|
198
|
-
[data-ui
|
|
206
|
+
[data-ui-drawer][data-size='lg'] {
|
|
199
207
|
--_step: var(--slotted-drawer-extent-lg, 30rem);
|
|
200
208
|
}
|
|
201
209
|
|
|
202
|
-
[data-ui
|
|
210
|
+
[data-ui-drawer][data-size='xl'] {
|
|
203
211
|
--_step: var(--slotted-drawer-extent-xl, 40rem);
|
|
204
212
|
--_padding-inline: var(--slotted-space-8, 1.5rem);
|
|
205
213
|
--_title-font-size: var(--slotted-font-size-xl, 1.125rem);
|
|
206
214
|
}
|
|
207
215
|
|
|
208
216
|
/** The step a drawer that is a page takes: the whole layer, and no measure. */
|
|
209
|
-
[data-ui
|
|
217
|
+
[data-ui-drawer][data-size='full'] {
|
|
210
218
|
--_step: 100%;
|
|
211
219
|
}
|
|
212
220
|
|
|
@@ -218,7 +226,7 @@
|
|
|
218
226
|
* over a dialog is one step above it on the single stack the library keeps
|
|
219
227
|
* rather than a number this stylesheet guessed.
|
|
220
228
|
*/
|
|
221
|
-
[data-ui
|
|
229
|
+
[data-ui-drawer][data-mode='overlay'] {
|
|
222
230
|
position: fixed;
|
|
223
231
|
inset: 0;
|
|
224
232
|
z-index: calc(var(--slotted-z-index-overlay, 1000) + var(--slotted-layer-depth, 0));
|
|
@@ -235,20 +243,20 @@
|
|
|
235
243
|
* a mode here, because a family writing a margin on an element it does not
|
|
236
244
|
* own is a family deciding someone else's layout.
|
|
237
245
|
*/
|
|
238
|
-
[data-ui
|
|
246
|
+
[data-ui-drawer][data-mode='inline'] {
|
|
239
247
|
overflow: clip;
|
|
240
248
|
}
|
|
241
249
|
|
|
242
|
-
[data-ui
|
|
243
|
-
[data-ui
|
|
250
|
+
[data-ui-drawer][data-mode='inline'][data-side='start'],
|
|
251
|
+
[data-ui-drawer][data-mode='inline'][data-side='end'] {
|
|
244
252
|
inline-size: 0;
|
|
245
253
|
transition:
|
|
246
254
|
inline-size var(--_move),
|
|
247
255
|
var(--_reveal);
|
|
248
256
|
}
|
|
249
257
|
|
|
250
|
-
[data-ui
|
|
251
|
-
[data-ui
|
|
258
|
+
[data-ui-drawer][data-mode='inline'][data-side='top'],
|
|
259
|
+
[data-ui-drawer][data-mode='inline'][data-side='bottom'] {
|
|
252
260
|
block-size: 0;
|
|
253
261
|
transition:
|
|
254
262
|
block-size var(--_move),
|
|
@@ -269,14 +277,14 @@
|
|
|
269
277
|
* to nought, and a cap against a box on its way to nought is what would
|
|
270
278
|
* rewrap the panel on the way out.
|
|
271
279
|
*/
|
|
272
|
-
[data-ui
|
|
273
|
-
[data-ui
|
|
280
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='start'],
|
|
281
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='end'] {
|
|
274
282
|
inline-size: var(--_extent);
|
|
275
283
|
max-inline-size: 100%;
|
|
276
284
|
}
|
|
277
285
|
|
|
278
|
-
[data-ui
|
|
279
|
-
[data-ui
|
|
286
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='top'],
|
|
287
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='bottom'] {
|
|
280
288
|
block-size: var(--_extent);
|
|
281
289
|
max-block-size: 100%;
|
|
282
290
|
}
|
|
@@ -290,7 +298,7 @@
|
|
|
290
298
|
* `data-open`: the entering frame has no `data-open` either, and a hidden
|
|
291
299
|
* panel in that frame refuses the focus scope's initial focus.
|
|
292
300
|
*/
|
|
293
|
-
[data-ui
|
|
301
|
+
[data-ui-drawer][inert] {
|
|
294
302
|
content-visibility: hidden;
|
|
295
303
|
pointer-events: none;
|
|
296
304
|
}
|
|
@@ -299,12 +307,12 @@
|
|
|
299
307
|
|
|
300
308
|
/**
|
|
301
309
|
* `--slotted-scrim` is a foundation token the theme restates per scheme and
|
|
302
|
-
* remaps to `Canvas` under forced
|
|
310
|
+
* remaps to `Canvas` under forced colors, where it becomes an opaque ground.
|
|
303
311
|
* That is why the panel below carries an edge of its own: every shadow token
|
|
304
312
|
* is `none` in that mode, and a panel separated only by elevation would sit on
|
|
305
313
|
* an opaque ground with nothing marking where it starts.
|
|
306
314
|
*/
|
|
307
|
-
[data-ui
|
|
315
|
+
[data-ui-drawer] > [data-part-backdrop] {
|
|
308
316
|
grid-area: 1 / 1;
|
|
309
317
|
background: var(--slotted-drawer-scrim, var(--slotted-scrim, Canvas));
|
|
310
318
|
opacity: 0;
|
|
@@ -321,7 +329,7 @@
|
|
|
321
329
|
* close is waiting, and the page behind is back before the panel has finished
|
|
322
330
|
* going.
|
|
323
331
|
*/
|
|
324
|
-
[data-ui
|
|
332
|
+
[data-ui-drawer][data-open] > [data-part-backdrop] {
|
|
325
333
|
opacity: 1;
|
|
326
334
|
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
327
335
|
}
|
|
@@ -334,7 +342,7 @@
|
|
|
334
342
|
* body is long — the failure Vaul, MUI and Angular Material all leave to each
|
|
335
343
|
* consumer's own CSS, because none of the three ships a layout.
|
|
336
344
|
*/
|
|
337
|
-
[data-ui
|
|
345
|
+
[data-ui-drawer] > [data-part-panel] {
|
|
338
346
|
grid-area: 1 / 1;
|
|
339
347
|
box-sizing: border-box;
|
|
340
348
|
/**
|
|
@@ -393,6 +401,16 @@
|
|
|
393
401
|
border-width: 0;
|
|
394
402
|
/* So the leading corners clip the row that scrolls under them. */
|
|
395
403
|
overflow: hidden;
|
|
404
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
405
|
+
-webkit-backdrop-filter: var(--slotted-drawer-backdrop-filter, none);
|
|
406
|
+
backdrop-filter: var(--slotted-drawer-backdrop-filter, none);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
410
|
+
[data-ui-drawer] > [data-part-panel] {
|
|
411
|
+
-webkit-backdrop-filter: none;
|
|
412
|
+
backdrop-filter: none;
|
|
413
|
+
}
|
|
396
414
|
}
|
|
397
415
|
|
|
398
416
|
/**
|
|
@@ -403,7 +421,7 @@
|
|
|
403
421
|
* physical axis, and a start-side panel leaves toward the left of a
|
|
404
422
|
* left-to-right document and toward the right of a mirrored one.
|
|
405
423
|
*/
|
|
406
|
-
[data-ui
|
|
424
|
+
[data-ui-drawer][data-mode='overlay'] > [data-part-panel] {
|
|
407
425
|
box-shadow: var(--slotted-shadow-lg);
|
|
408
426
|
translate: 0 0;
|
|
409
427
|
/* The measure is restated here, or this rule would replace the base one:
|
|
@@ -412,10 +430,12 @@
|
|
|
412
430
|
transition:
|
|
413
431
|
translate var(--_slide),
|
|
414
432
|
inline-size var(--_move),
|
|
415
|
-
block-size var(--_move)
|
|
433
|
+
block-size var(--_move),
|
|
434
|
+
border-start-start-radius var(--_move),
|
|
435
|
+
border-start-end-radius var(--_move);
|
|
416
436
|
}
|
|
417
437
|
|
|
418
|
-
[data-ui
|
|
438
|
+
[data-ui-drawer][data-mode='overlay']:not([data-open]) > [data-part-panel] {
|
|
419
439
|
translate: var(--_shift-x, 0) var(--_shift-y, 0);
|
|
420
440
|
}
|
|
421
441
|
|
|
@@ -435,18 +455,18 @@
|
|
|
435
455
|
* transition here would put the panel behind the hand by the whole duration.
|
|
436
456
|
* The slide stays, because a panel released mid-gesture still has an exit.
|
|
437
457
|
*/
|
|
438
|
-
[data-ui
|
|
458
|
+
[data-ui-drawer][data-dragging] > [data-part-panel] {
|
|
439
459
|
transition: none;
|
|
440
460
|
}
|
|
441
461
|
|
|
442
|
-
[data-ui
|
|
462
|
+
[data-ui-drawer][data-dragging][data-mode='overlay'] > [data-part-panel] {
|
|
443
463
|
transition: translate var(--_slide);
|
|
444
464
|
}
|
|
445
465
|
|
|
446
|
-
[data-ui
|
|
447
|
-
[data-ui
|
|
448
|
-
[data-ui
|
|
449
|
-
[data-ui
|
|
466
|
+
[data-ui-drawer][data-dragging][data-mode='inline'][data-side='start'],
|
|
467
|
+
[data-ui-drawer][data-dragging][data-mode='inline'][data-side='end'],
|
|
468
|
+
[data-ui-drawer][data-dragging][data-mode='inline'][data-side='top'],
|
|
469
|
+
[data-ui-drawer][data-dragging][data-mode='inline'][data-side='bottom'] {
|
|
450
470
|
transition: var(--_reveal);
|
|
451
471
|
}
|
|
452
472
|
|
|
@@ -456,7 +476,7 @@
|
|
|
456
476
|
* closed panel sits at rest because the layer hides it whole, above.
|
|
457
477
|
*/
|
|
458
478
|
@media (prefers-reduced-motion: reduce) {
|
|
459
|
-
[data-ui
|
|
479
|
+
[data-ui-drawer][data-mode='overlay'] > [data-part-panel] {
|
|
460
480
|
translate: 0 0;
|
|
461
481
|
transition:
|
|
462
482
|
inline-size var(--_move),
|
|
@@ -466,20 +486,20 @@
|
|
|
466
486
|
|
|
467
487
|
/* ── Where the panel sits, and where it goes when it leaves ───────────── */
|
|
468
488
|
|
|
469
|
-
[data-ui
|
|
470
|
-
[data-ui
|
|
489
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel],
|
|
490
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] {
|
|
471
491
|
align-self: stretch;
|
|
472
492
|
inline-size: min(var(--_extent), 100%);
|
|
473
493
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
474
494
|
}
|
|
475
495
|
|
|
476
|
-
[data-ui
|
|
477
|
-
[data-ui
|
|
496
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel],
|
|
497
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] {
|
|
478
498
|
justify-self: stretch;
|
|
479
499
|
block-size: min(var(--_extent), 100%);
|
|
480
500
|
}
|
|
481
501
|
|
|
482
|
-
[data-ui
|
|
502
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] {
|
|
483
503
|
justify-self: start;
|
|
484
504
|
--_shift-x: -100%;
|
|
485
505
|
/* The resizer lies over this edge, so the rows keep clear of it. */
|
|
@@ -487,7 +507,7 @@
|
|
|
487
507
|
border-inline-end-width: var(--_rule-size);
|
|
488
508
|
}
|
|
489
509
|
|
|
490
|
-
[data-ui
|
|
510
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] {
|
|
491
511
|
justify-self: end;
|
|
492
512
|
--_shift-x: 100%;
|
|
493
513
|
--_row-padding-inline-start: max(var(--_padding-inline), var(--_resizer-thickness));
|
|
@@ -507,7 +527,7 @@
|
|
|
507
527
|
* resizer would otherwise put its body in an `auto` track and lose the one
|
|
508
528
|
* declaration that keeps the footer on screen.
|
|
509
529
|
*/
|
|
510
|
-
[data-ui
|
|
530
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] {
|
|
511
531
|
align-self: start;
|
|
512
532
|
grid-template-rows: auto minmax(0, 1fr) auto auto;
|
|
513
533
|
--_shift-y: -100%;
|
|
@@ -516,7 +536,7 @@
|
|
|
516
536
|
border-end-end-radius: var(--slotted-drawer-radius, var(--_radius));
|
|
517
537
|
}
|
|
518
538
|
|
|
519
|
-
[data-ui
|
|
539
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] {
|
|
520
540
|
align-self: end;
|
|
521
541
|
grid-template-rows: auto auto minmax(0, 1fr) auto;
|
|
522
542
|
--_shift-y: 100%;
|
|
@@ -525,20 +545,36 @@
|
|
|
525
545
|
border-start-end-radius: var(--slotted-drawer-radius, var(--_radius));
|
|
526
546
|
}
|
|
527
547
|
|
|
548
|
+
/**
|
|
549
|
+
* A sheet that reaches the top of the layer is the screen, Material 3's
|
|
550
|
+
* expanded bottom sheet: its top corners square — a theme keeps a radius
|
|
551
|
+
* with `--slotted-drawer-radius-expanded` — and its header clears the safe
|
|
552
|
+
* area the status bar takes. The binding writes `data-expanded` while the
|
|
553
|
+
* extent is the whole layer, and under `size="full"`.
|
|
554
|
+
*/
|
|
555
|
+
[data-ui-drawer][data-side='bottom'][data-expanded] > [data-part-panel] {
|
|
556
|
+
border-start-start-radius: var(--slotted-drawer-radius-expanded, 0px);
|
|
557
|
+
border-start-end-radius: var(--slotted-drawer-radius-expanded, 0px);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
[data-ui-drawer][data-side='bottom'][data-expanded] > [data-part-panel] > [data-part-header] {
|
|
561
|
+
padding-block-start: calc(var(--_padding-block) + env(safe-area-inset-top, 0px));
|
|
562
|
+
}
|
|
563
|
+
|
|
528
564
|
/**
|
|
529
565
|
* A sheet's separator takes the first row, so the three that follow move down
|
|
530
566
|
* one. `top` needs no such rule: its separator is the fourth row and the
|
|
531
567
|
* three above it are already where the base puts them.
|
|
532
568
|
*/
|
|
533
|
-
[data-ui
|
|
569
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-header] {
|
|
534
570
|
grid-row: 2;
|
|
535
571
|
}
|
|
536
572
|
|
|
537
|
-
[data-ui
|
|
573
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-body] {
|
|
538
574
|
grid-row: 3;
|
|
539
575
|
}
|
|
540
576
|
|
|
541
|
-
[data-ui
|
|
577
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-footer] {
|
|
542
578
|
grid-row: 4;
|
|
543
579
|
}
|
|
544
580
|
|
|
@@ -546,18 +582,24 @@
|
|
|
546
582
|
|
|
547
583
|
/**
|
|
548
584
|
* A sheet on a wide layer is a card over the page, not a strip across it:
|
|
549
|
-
* forty rems, Material 3's 640 dp,
|
|
550
|
-
* edge then shows on three sides, so the panel draws it on three
|
|
551
|
-
*
|
|
585
|
+
* forty rems, Material 3's 640 dp, centerd, with the scrim on both sides. The
|
|
586
|
+
* edge then shows on three sides, so the panel draws it on three. An overlay
|
|
587
|
+
* layer is the viewport, so at the sheet's measure or under it — a phone —
|
|
588
|
+
* the side edges would sit on the screen's own and are not drawn.
|
|
552
589
|
*/
|
|
553
|
-
[data-ui
|
|
554
|
-
[data-ui
|
|
590
|
+
[data-ui-drawer][data-mode='overlay'][data-side='top'] > [data-part-panel],
|
|
591
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'] > [data-part-panel] {
|
|
555
592
|
justify-self: center;
|
|
556
593
|
inline-size: min(
|
|
557
594
|
100%,
|
|
558
595
|
var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))
|
|
559
596
|
);
|
|
560
|
-
border-inline-width:
|
|
597
|
+
border-inline-width: clamp(
|
|
598
|
+
0px,
|
|
599
|
+
(100vw - var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))) *
|
|
600
|
+
1000,
|
|
601
|
+
var(--_rule-size)
|
|
602
|
+
);
|
|
561
603
|
}
|
|
562
604
|
|
|
563
605
|
/**
|
|
@@ -574,7 +616,7 @@
|
|
|
574
616
|
* arrives while the sheet is open, and a release back onto the content stop. A
|
|
575
617
|
* browser without it jumps, and nothing else changes.
|
|
576
618
|
*/
|
|
577
|
-
[data-ui
|
|
619
|
+
[data-ui-drawer][data-size='content'] {
|
|
578
620
|
--_step: auto;
|
|
579
621
|
--_content-cap: min(
|
|
580
622
|
var(--slotted-drawer-extent, calc(100% - var(--slotted-space-12, 4rem))),
|
|
@@ -583,19 +625,19 @@
|
|
|
583
625
|
interpolate-size: allow-keywords;
|
|
584
626
|
}
|
|
585
627
|
|
|
586
|
-
[data-ui
|
|
587
|
-
[data-ui
|
|
628
|
+
[data-ui-drawer][data-size='content'][data-side='start'],
|
|
629
|
+
[data-ui-drawer][data-size='content'][data-side='end'] {
|
|
588
630
|
--_step: max-content;
|
|
589
631
|
}
|
|
590
632
|
|
|
591
|
-
[data-ui
|
|
592
|
-
[data-ui
|
|
633
|
+
[data-ui-drawer][data-size='content'][data-side='start'] > [data-part-panel],
|
|
634
|
+
[data-ui-drawer][data-size='content'][data-side='end'] > [data-part-panel] {
|
|
593
635
|
inline-size: var(--_extent);
|
|
594
636
|
max-inline-size: var(--_content-cap);
|
|
595
637
|
}
|
|
596
638
|
|
|
597
|
-
[data-ui
|
|
598
|
-
[data-ui
|
|
639
|
+
[data-ui-drawer][data-size='content'][data-side='top'] > [data-part-panel],
|
|
640
|
+
[data-ui-drawer][data-size='content'][data-side='bottom'] > [data-part-panel] {
|
|
599
641
|
block-size: var(--_extent);
|
|
600
642
|
max-block-size: var(--_content-cap);
|
|
601
643
|
}
|
|
@@ -606,7 +648,7 @@
|
|
|
606
648
|
* cell the panel sits in shrinks by it, so a sheet lands above the keys and a
|
|
607
649
|
* side panel's footer does too, and every `100%` cap shrinks with the cell.
|
|
608
650
|
*/
|
|
609
|
-
[data-ui
|
|
651
|
+
[data-ui-drawer][data-mode='overlay'] {
|
|
610
652
|
padding-block-end: var(--slotted-keyboard-inset, 0px);
|
|
611
653
|
}
|
|
612
654
|
|
|
@@ -616,18 +658,18 @@
|
|
|
616
658
|
* press on it reaches it. The opacity keeps the transition the scrim already
|
|
617
659
|
* has, so crossing the stop fades rather than blinks.
|
|
618
660
|
*/
|
|
619
|
-
[data-ui
|
|
661
|
+
[data-ui-drawer][data-undimmed] > [data-part-backdrop] {
|
|
620
662
|
opacity: 0;
|
|
621
663
|
pointer-events: none;
|
|
622
664
|
}
|
|
623
665
|
|
|
624
666
|
/* The layer is fixed over the whole viewport, so the scrim alone letting the
|
|
625
667
|
press through leaves the root to catch it; the panel takes it back. */
|
|
626
|
-
[data-ui
|
|
668
|
+
[data-ui-drawer][data-undimmed] {
|
|
627
669
|
pointer-events: none;
|
|
628
670
|
}
|
|
629
671
|
|
|
630
|
-
[data-ui
|
|
672
|
+
[data-ui-drawer][data-undimmed] > [data-part-panel] {
|
|
631
673
|
pointer-events: auto;
|
|
632
674
|
}
|
|
633
675
|
|
|
@@ -636,16 +678,16 @@
|
|
|
636
678
|
* sits over its end. The inset is padding inside the scrollport, so the last
|
|
637
679
|
* line scrolls clear of the indicator rather than stopping under it.
|
|
638
680
|
*/
|
|
639
|
-
[data-ui
|
|
681
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-body]:last-child {
|
|
640
682
|
padding-block-end: calc(var(--_padding-block) + env(safe-area-inset-bottom, 0px));
|
|
641
683
|
}
|
|
642
684
|
|
|
643
685
|
/** `start` is the left edge in one direction and the right edge in the other. */
|
|
644
|
-
[data-ui
|
|
686
|
+
[data-ui-drawer][data-side='start']:dir(rtl) > [data-part-panel] {
|
|
645
687
|
--_shift-x: 100%;
|
|
646
688
|
}
|
|
647
689
|
|
|
648
|
-
[data-ui
|
|
690
|
+
[data-ui-drawer][data-side='end']:dir(rtl) > [data-part-panel] {
|
|
649
691
|
--_shift-x: -100%;
|
|
650
692
|
}
|
|
651
693
|
|
|
@@ -655,13 +697,13 @@
|
|
|
655
697
|
* which on a phone reads as a stray line under the browser chrome. `dialog`
|
|
656
698
|
* removed the same line from its own full-screen step for the same reason.
|
|
657
699
|
*
|
|
658
|
-
* A step the layer is too narrow to
|
|
700
|
+
* A step the layer is too narrow to honor is clamped by `min(…, 100%)` and
|
|
659
701
|
* still draws its edge. CSS cannot compare a resolved length to its
|
|
660
702
|
* container, and the four container queries that would answer it — one per
|
|
661
703
|
* step, because a container condition cannot hold a custom property — buy one
|
|
662
704
|
* hairline at the extreme edge of the viewport.
|
|
663
705
|
*/
|
|
664
|
-
[data-ui
|
|
706
|
+
[data-ui-drawer][data-mode][data-size='full'] > [data-part-panel] {
|
|
665
707
|
border-width: 0;
|
|
666
708
|
border-radius: 0;
|
|
667
709
|
}
|
|
@@ -671,13 +713,13 @@
|
|
|
671
713
|
* from, which is what `overflow: clip` on the root is for. `min(…, 100%)`
|
|
672
714
|
* would resolve against a box that is on its way to nought.
|
|
673
715
|
*/
|
|
674
|
-
[data-ui
|
|
675
|
-
[data-ui
|
|
716
|
+
[data-ui-drawer][data-mode='inline'][data-side='start'] > [data-part-panel],
|
|
717
|
+
[data-ui-drawer][data-mode='inline'][data-side='end'] > [data-part-panel] {
|
|
676
718
|
inline-size: var(--_extent);
|
|
677
719
|
}
|
|
678
720
|
|
|
679
|
-
[data-ui
|
|
680
|
-
[data-ui
|
|
721
|
+
[data-ui-drawer][data-mode='inline'][data-side='top'] > [data-part-panel],
|
|
722
|
+
[data-ui-drawer][data-mode='inline'][data-side='bottom'] > [data-part-panel] {
|
|
681
723
|
block-size: var(--_extent);
|
|
682
724
|
}
|
|
683
725
|
|
|
@@ -688,13 +730,13 @@
|
|
|
688
730
|
* a worse picture than one that wrapped. The cap is on `[data-open]` for the
|
|
689
731
|
* reason the root's is.
|
|
690
732
|
*/
|
|
691
|
-
[data-ui
|
|
692
|
-
[data-ui
|
|
733
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='start'] > [data-part-panel],
|
|
734
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='end'] > [data-part-panel] {
|
|
693
735
|
max-inline-size: 100%;
|
|
694
736
|
}
|
|
695
737
|
|
|
696
|
-
[data-ui
|
|
697
|
-
[data-ui
|
|
738
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='top'] > [data-part-panel],
|
|
739
|
+
[data-ui-drawer][data-mode='inline'][data-open][data-side='bottom'] > [data-part-panel] {
|
|
698
740
|
max-block-size: 100%;
|
|
699
741
|
}
|
|
700
742
|
|
|
@@ -712,7 +754,7 @@
|
|
|
712
754
|
* separator drawing anything at rest is a decoration on an edge nobody is
|
|
713
755
|
* touching. Both halves of that were wrong. A resizable edge nobody can see
|
|
714
756
|
* is a capability nobody finds, and it was reported as exactly that; and the
|
|
715
|
-
* accent is the one
|
|
757
|
+
* accent is the one color in the library that means "the keyboard is here",
|
|
716
758
|
* so spending it on hover left nothing to say at focus.
|
|
717
759
|
*
|
|
718
760
|
* The picture is `splitter`'s, which is the family that settled it: two
|
|
@@ -730,8 +772,8 @@
|
|
|
730
772
|
* looking.
|
|
731
773
|
*
|
|
732
774
|
* **The pointer reach is not the picture.** `::before` is a transparent box
|
|
733
|
-
* of `--slotted-target-min`,
|
|
734
|
-
* the WCAG 2.2 floor while the picture stays thin.
|
|
775
|
+
* of `--slotted-target-min`, centerd on the gutter, so the target holds at
|
|
776
|
+
* the WCAG 2.2 floor while the picture stays thin. Centerd rather than run
|
|
735
777
|
* inward: inward it would take twenty pixels of the panel and, on a sheet,
|
|
736
778
|
* sit over the header.
|
|
737
779
|
*
|
|
@@ -753,7 +795,7 @@
|
|
|
753
795
|
*
|
|
754
796
|
* `touch-action: none` so a drag is not read as a scroll on the way past.
|
|
755
797
|
*/
|
|
756
|
-
[data-ui
|
|
798
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer] {
|
|
757
799
|
display: flex;
|
|
758
800
|
align-items: center;
|
|
759
801
|
justify-content: center;
|
|
@@ -762,11 +804,11 @@
|
|
|
762
804
|
touch-action: none;
|
|
763
805
|
|
|
764
806
|
/**
|
|
765
|
-
* The two steps, and the whole of the
|
|
807
|
+
* The two steps, and the whole of the color decision — the same one
|
|
766
808
|
* `splitter` makes, because the two are one picture in two families.
|
|
767
809
|
*
|
|
768
810
|
* The strong border step at rest, not the subtle one and not the accent.
|
|
769
|
-
* The accent is the one
|
|
811
|
+
* The accent is the one color in the library that means "the keyboard is
|
|
770
812
|
* here", and this family used to spend it on hover as well: a two-pixel
|
|
771
813
|
* accent line appearing under the hand on an edge that drew nothing at all
|
|
772
814
|
* before it. Both halves of that were wrong. An edge nobody can see is a
|
|
@@ -781,69 +823,67 @@
|
|
|
781
823
|
}
|
|
782
824
|
|
|
783
825
|
/* Under the hand the gap closes and the marks read as one. */
|
|
784
|
-
[data-ui
|
|
785
|
-
[data-ui
|
|
786
|
-
|
|
787
|
-
> [data-part='resizer']:not([data-disabled]):focus-visible,
|
|
788
|
-
[data-ui='drawer'][data-dragging] > [data-part='panel'] > [data-part='resizer'] {
|
|
826
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer]:not([data-disabled]):hover,
|
|
827
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer]:not([data-disabled]):focus-visible,
|
|
828
|
+
[data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] {
|
|
789
829
|
gap: var(--slotted-space-4, 0.5rem);
|
|
790
830
|
}
|
|
791
831
|
|
|
792
|
-
[data-ui
|
|
793
|
-
[data-ui
|
|
832
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer],
|
|
833
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
|
|
794
834
|
flex-direction: column;
|
|
795
835
|
}
|
|
796
836
|
|
|
797
837
|
/**
|
|
798
|
-
* The reach. Transparent,
|
|
838
|
+
* The reach. Transparent, centerd on the gutter and above the panel's own
|
|
799
839
|
* rows, which is what makes a four-pixel picture a twenty-four-pixel target.
|
|
800
840
|
*/
|
|
801
|
-
[data-ui
|
|
841
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer]::before {
|
|
802
842
|
content: '';
|
|
803
843
|
position: absolute;
|
|
804
844
|
--_reach-overhang: calc((var(--_resizer-reach) - var(--_resizer-thickness)) / -2);
|
|
805
845
|
}
|
|
806
846
|
|
|
807
|
-
[data-ui
|
|
808
|
-
[data-ui
|
|
847
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer]::before,
|
|
848
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer]::before {
|
|
809
849
|
inset-block: 0;
|
|
810
850
|
inset-inline: var(--_reach-overhang);
|
|
811
851
|
}
|
|
812
852
|
|
|
813
|
-
[data-ui
|
|
814
|
-
[data-ui
|
|
853
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer]::before,
|
|
854
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer]::before {
|
|
815
855
|
inset-inline: 0;
|
|
816
856
|
inset-block: var(--_reach-overhang);
|
|
817
857
|
}
|
|
818
858
|
|
|
819
|
-
[data-ui
|
|
820
|
-
[data-ui
|
|
859
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer],
|
|
860
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
|
|
821
861
|
position: absolute;
|
|
822
862
|
inset-block: 0;
|
|
823
863
|
inline-size: var(--_resizer-thickness);
|
|
824
864
|
cursor: col-resize;
|
|
825
865
|
}
|
|
826
866
|
|
|
827
|
-
[data-ui
|
|
867
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer] {
|
|
828
868
|
inset-inline-end: 0;
|
|
829
869
|
}
|
|
830
870
|
|
|
831
|
-
[data-ui
|
|
871
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] {
|
|
832
872
|
inset-inline-start: 0;
|
|
833
873
|
}
|
|
834
874
|
|
|
835
|
-
[data-ui
|
|
836
|
-
[data-ui
|
|
875
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer],
|
|
876
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer] {
|
|
837
877
|
position: relative;
|
|
838
878
|
block-size: var(--_resizer-thickness);
|
|
839
879
|
cursor: row-resize;
|
|
840
880
|
}
|
|
841
881
|
|
|
842
|
-
[data-ui
|
|
882
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-resizer] {
|
|
843
883
|
grid-row: 1;
|
|
844
884
|
}
|
|
845
885
|
|
|
846
|
-
[data-ui
|
|
886
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] {
|
|
847
887
|
grid-row: 4;
|
|
848
888
|
}
|
|
849
889
|
|
|
@@ -856,7 +896,7 @@
|
|
|
856
896
|
*
|
|
857
897
|
* A sheet paints none of them — see the grabber below.
|
|
858
898
|
*/
|
|
859
|
-
[data-ui
|
|
899
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer] > [data-part-line] {
|
|
860
900
|
flex: 0 1 min(var(--slotted-space-12, 4rem), 20%);
|
|
861
901
|
min-block-size: 0;
|
|
862
902
|
min-inline-size: 0;
|
|
@@ -869,40 +909,37 @@
|
|
|
869
909
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
870
910
|
}
|
|
871
911
|
|
|
872
|
-
[data-ui
|
|
873
|
-
> [data-part
|
|
874
|
-
> [data-part
|
|
875
|
-
> [data-part
|
|
876
|
-
[data-ui
|
|
877
|
-
> [data-part
|
|
878
|
-
> [data-part
|
|
879
|
-
> [data-part
|
|
912
|
+
[data-ui-drawer][data-side='start']
|
|
913
|
+
> [data-part-panel]
|
|
914
|
+
> [data-part-resizer]
|
|
915
|
+
> [data-part-line]:first-child,
|
|
916
|
+
[data-ui-drawer][data-side='end']
|
|
917
|
+
> [data-part-panel]
|
|
918
|
+
> [data-part-resizer]
|
|
919
|
+
> [data-part-line]:first-child {
|
|
880
920
|
background: linear-gradient(to bottom, transparent, var(--_rest));
|
|
881
921
|
}
|
|
882
922
|
|
|
883
|
-
[data-ui
|
|
884
|
-
> [data-part
|
|
885
|
-
> [data-part
|
|
886
|
-
> [data-part
|
|
887
|
-
[data-ui
|
|
888
|
-
> [data-part
|
|
889
|
-
> [data-part
|
|
890
|
-
> [data-part
|
|
923
|
+
[data-ui-drawer][data-side='start']
|
|
924
|
+
> [data-part-panel]
|
|
925
|
+
> [data-part-resizer]
|
|
926
|
+
> [data-part-line]:last-child,
|
|
927
|
+
[data-ui-drawer][data-side='end']
|
|
928
|
+
> [data-part-panel]
|
|
929
|
+
> [data-part-resizer]
|
|
930
|
+
> [data-part-line]:last-child {
|
|
891
931
|
background: linear-gradient(to top, transparent, var(--_rest));
|
|
892
932
|
}
|
|
893
933
|
|
|
894
|
-
[data-ui
|
|
895
|
-
> [data-part
|
|
896
|
-
> [data-part
|
|
897
|
-
> [data-part
|
|
898
|
-
[data-ui
|
|
899
|
-
> [data-part
|
|
900
|
-
> [data-part
|
|
901
|
-
> [data-part
|
|
902
|
-
[data-ui
|
|
903
|
-
> [data-part='panel']
|
|
904
|
-
> [data-part='resizer']
|
|
905
|
-
> [data-part='line'] {
|
|
934
|
+
[data-ui-drawer]
|
|
935
|
+
> [data-part-panel]
|
|
936
|
+
> [data-part-resizer]:not([data-disabled]):hover
|
|
937
|
+
> [data-part-line],
|
|
938
|
+
[data-ui-drawer]
|
|
939
|
+
> [data-part-panel]
|
|
940
|
+
> [data-part-resizer]:not([data-disabled]):focus-visible
|
|
941
|
+
> [data-part-line],
|
|
942
|
+
[data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] > [data-part-line] {
|
|
906
943
|
flex-basis: 100%;
|
|
907
944
|
background: var(--_active);
|
|
908
945
|
}
|
|
@@ -918,7 +955,7 @@
|
|
|
918
955
|
* there because a sheet is not held at its corners; it is held in the middle,
|
|
919
956
|
* which is where every mobile sheet in the field puts its mark.
|
|
920
957
|
*/
|
|
921
|
-
[data-ui
|
|
958
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
|
|
922
959
|
flex: none;
|
|
923
960
|
transition:
|
|
924
961
|
background-color var(--slotted-control-transition-duration, var(--slotted-duration-short))
|
|
@@ -927,14 +964,8 @@
|
|
|
927
964
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
928
965
|
}
|
|
929
966
|
|
|
930
|
-
[data-ui
|
|
931
|
-
|
|
932
|
-
> [data-part='resizer']
|
|
933
|
-
> [data-part='grip'],
|
|
934
|
-
[data-ui='drawer'][data-side='end']
|
|
935
|
-
> [data-part='panel']
|
|
936
|
-
> [data-part='resizer']
|
|
937
|
-
> [data-part='grip'] {
|
|
967
|
+
[data-ui-drawer][data-side='start'] > [data-part-panel] > [data-part-resizer] > [data-part-grip],
|
|
968
|
+
[data-ui-drawer][data-side='end'] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
|
|
938
969
|
color: var(--_rest);
|
|
939
970
|
background-image: radial-gradient(circle at center, currentColor 40%, transparent 42%);
|
|
940
971
|
background-size: var(--slotted-space-2, 0.25rem) var(--slotted-space-2, 0.25rem);
|
|
@@ -942,15 +973,12 @@
|
|
|
942
973
|
block-size: calc(3 * var(--slotted-space-2, 0.25rem));
|
|
943
974
|
}
|
|
944
975
|
|
|
945
|
-
/* The grabber. Four by thirty-six, full radius,
|
|
946
|
-
[data-ui
|
|
947
|
-
|
|
948
|
-
> [data-part
|
|
949
|
-
> [data-part
|
|
950
|
-
|
|
951
|
-
> [data-part='panel']
|
|
952
|
-
> [data-part='resizer']
|
|
953
|
-
> [data-part='grip'] {
|
|
976
|
+
/* The grabber. Four by thirty-six, full radius, centerd above the header. */
|
|
977
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] > [data-part-grip],
|
|
978
|
+
[data-ui-drawer][data-side='bottom']
|
|
979
|
+
> [data-part-panel]
|
|
980
|
+
> [data-part-resizer]
|
|
981
|
+
> [data-part-grip] {
|
|
954
982
|
background-color: var(--_rest);
|
|
955
983
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
956
984
|
block-size: var(--slotted-space-2, 0.25rem);
|
|
@@ -958,63 +986,57 @@
|
|
|
958
986
|
}
|
|
959
987
|
|
|
960
988
|
/* A sheet's lines are not painted: the pill is the whole picture. */
|
|
961
|
-
[data-ui
|
|
962
|
-
|
|
963
|
-
> [data-part
|
|
964
|
-
> [data-part
|
|
965
|
-
|
|
966
|
-
> [data-part='panel']
|
|
967
|
-
> [data-part='resizer']
|
|
968
|
-
> [data-part='line'] {
|
|
989
|
+
[data-ui-drawer][data-side='top'] > [data-part-panel] > [data-part-resizer] > [data-part-line],
|
|
990
|
+
[data-ui-drawer][data-side='bottom']
|
|
991
|
+
> [data-part-panel]
|
|
992
|
+
> [data-part-resizer]
|
|
993
|
+
> [data-part-line] {
|
|
969
994
|
display: none;
|
|
970
995
|
}
|
|
971
996
|
|
|
972
997
|
/**
|
|
973
|
-
* The dot matrix
|
|
998
|
+
* The dot matrix recolors its ink and nothing else: its dots are
|
|
974
999
|
* `currentColor` over a transparent box, and a `background-color` here filled
|
|
975
1000
|
* the box — the grip became a solid block under the hand, under hover and
|
|
976
1001
|
* under focus. `splitter`, which draws the same picture, only ever changed
|
|
977
|
-
* `color`. The pill on a block side is a filled box, so it
|
|
1002
|
+
* `color`. The pill on a block side is a filled box, so it recolors its fill.
|
|
978
1003
|
*/
|
|
979
|
-
[data-ui
|
|
980
|
-
> [data-part
|
|
981
|
-
> [data-part
|
|
982
|
-
> [data-part
|
|
983
|
-
[data-ui
|
|
984
|
-
> [data-part
|
|
985
|
-
> [data-part
|
|
986
|
-
> [data-part
|
|
987
|
-
[data-ui
|
|
988
|
-
> [data-part='panel']
|
|
989
|
-
> [data-part='resizer']
|
|
990
|
-
> [data-part='grip'] {
|
|
1004
|
+
[data-ui-drawer]
|
|
1005
|
+
> [data-part-panel]
|
|
1006
|
+
> [data-part-resizer]:not([data-disabled]):hover
|
|
1007
|
+
> [data-part-grip],
|
|
1008
|
+
[data-ui-drawer]
|
|
1009
|
+
> [data-part-panel]
|
|
1010
|
+
> [data-part-resizer]:not([data-disabled]):focus-visible
|
|
1011
|
+
> [data-part-grip],
|
|
1012
|
+
[data-ui-drawer][data-dragging] > [data-part-panel] > [data-part-resizer] > [data-part-grip] {
|
|
991
1013
|
color: var(--_active);
|
|
992
1014
|
}
|
|
993
1015
|
|
|
994
|
-
[data-ui
|
|
995
|
-
> [data-part
|
|
996
|
-
> [data-part
|
|
997
|
-
> [data-part
|
|
998
|
-
[data-ui
|
|
999
|
-
> [data-part
|
|
1000
|
-
> [data-part
|
|
1001
|
-
> [data-part
|
|
1002
|
-
[data-ui
|
|
1003
|
-
> [data-part
|
|
1004
|
-
> [data-part
|
|
1005
|
-
> [data-part
|
|
1006
|
-
[data-ui
|
|
1007
|
-
> [data-part
|
|
1008
|
-
> [data-part
|
|
1009
|
-
> [data-part
|
|
1010
|
-
[data-ui
|
|
1011
|
-
> [data-part
|
|
1012
|
-
> [data-part
|
|
1013
|
-
> [data-part
|
|
1014
|
-
[data-ui
|
|
1015
|
-
> [data-part
|
|
1016
|
-
> [data-part
|
|
1017
|
-
> [data-part
|
|
1016
|
+
[data-ui-drawer][data-side='top']
|
|
1017
|
+
> [data-part-panel]
|
|
1018
|
+
> [data-part-resizer]:not([data-disabled]):hover
|
|
1019
|
+
> [data-part-grip],
|
|
1020
|
+
[data-ui-drawer][data-side='bottom']
|
|
1021
|
+
> [data-part-panel]
|
|
1022
|
+
> [data-part-resizer]:not([data-disabled]):hover
|
|
1023
|
+
> [data-part-grip],
|
|
1024
|
+
[data-ui-drawer][data-side='top']
|
|
1025
|
+
> [data-part-panel]
|
|
1026
|
+
> [data-part-resizer]:not([data-disabled]):focus-visible
|
|
1027
|
+
> [data-part-grip],
|
|
1028
|
+
[data-ui-drawer][data-side='bottom']
|
|
1029
|
+
> [data-part-panel]
|
|
1030
|
+
> [data-part-resizer]:not([data-disabled]):focus-visible
|
|
1031
|
+
> [data-part-grip],
|
|
1032
|
+
[data-ui-drawer][data-dragging][data-side='top']
|
|
1033
|
+
> [data-part-panel]
|
|
1034
|
+
> [data-part-resizer]
|
|
1035
|
+
> [data-part-grip],
|
|
1036
|
+
[data-ui-drawer][data-dragging][data-side='bottom']
|
|
1037
|
+
> [data-part-panel]
|
|
1038
|
+
> [data-part-resizer]
|
|
1039
|
+
> [data-part-grip] {
|
|
1018
1040
|
background-color: var(--_active);
|
|
1019
1041
|
}
|
|
1020
1042
|
|
|
@@ -1031,10 +1053,10 @@
|
|
|
1031
1053
|
* its middle. The two pictures differ, which is all the ring has to do here.
|
|
1032
1054
|
*
|
|
1033
1055
|
* It cannot be drawn on the reach instead. `packages/styles/src/fallbacks.test.mjs`
|
|
1034
|
-
* forbids a system
|
|
1056
|
+
* forbids a system color inside `::before` or `::after`, and the ring's own
|
|
1035
1057
|
* last resort is `Highlight`.
|
|
1036
1058
|
*/
|
|
1037
|
-
[data-ui
|
|
1059
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-resizer]:focus-visible {
|
|
1038
1060
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1039
1061
|
outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
|
|
1040
1062
|
}
|
|
@@ -1046,13 +1068,13 @@
|
|
|
1046
1068
|
* between a resize the engine prepares for and one it discovers each frame.
|
|
1047
1069
|
* It is written on the panel because the panel is what changes size.
|
|
1048
1070
|
*/
|
|
1049
|
-
[data-ui
|
|
1050
|
-
[data-ui
|
|
1071
|
+
[data-ui-drawer][data-dragging][data-side='start'] > [data-part-panel],
|
|
1072
|
+
[data-ui-drawer][data-dragging][data-side='end'] > [data-part-panel] {
|
|
1051
1073
|
will-change: inline-size;
|
|
1052
1074
|
}
|
|
1053
1075
|
|
|
1054
|
-
[data-ui
|
|
1055
|
-
[data-ui
|
|
1076
|
+
[data-ui-drawer][data-dragging][data-side='top'] > [data-part-panel],
|
|
1077
|
+
[data-ui-drawer][data-dragging][data-side='bottom'] > [data-part-panel] {
|
|
1056
1078
|
will-change: block-size;
|
|
1057
1079
|
}
|
|
1058
1080
|
|
|
@@ -1068,7 +1090,7 @@
|
|
|
1068
1090
|
* consumer can write: a header, a body and a footer draw two rules; a header
|
|
1069
1091
|
* and a footer alone draw one; and a panel that is only a body draws none.
|
|
1070
1092
|
*/
|
|
1071
|
-
[data-ui
|
|
1093
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] {
|
|
1072
1094
|
grid-row: 1;
|
|
1073
1095
|
display: grid;
|
|
1074
1096
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
@@ -1085,7 +1107,7 @@
|
|
|
1085
1107
|
* panel past its own measure, and a panel pinned to an edge then pushes its
|
|
1086
1108
|
* inner edge across the layer.
|
|
1087
1109
|
*/
|
|
1088
|
-
[data-ui
|
|
1110
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-title] {
|
|
1089
1111
|
grid-column: 1;
|
|
1090
1112
|
grid-row: 1;
|
|
1091
1113
|
margin: 0;
|
|
@@ -1104,7 +1126,35 @@
|
|
|
1104
1126
|
color: var(--slotted-drawer-title-color, var(--slotted-text, CanvasText));
|
|
1105
1127
|
}
|
|
1106
1128
|
|
|
1107
|
-
|
|
1129
|
+
/* Actions take a column between the words and the close button, on the title's row. */
|
|
1130
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header]:has(> [data-part-actions]) {
|
|
1131
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/* A column gap is drawn beside an empty track too, so a header holds only the
|
|
1135
|
+
columns of the parts it has. */
|
|
1136
|
+
[data-ui-drawer]
|
|
1137
|
+
> [data-part-panel]
|
|
1138
|
+
> [data-part-header]:has(> [data-part-actions]):not(:has(> [data-part-close])) {
|
|
1139
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
[data-ui-drawer]
|
|
1143
|
+
> [data-part-panel]
|
|
1144
|
+
> [data-part-header]:not(:has(> [data-part-actions], > [data-part-close])) {
|
|
1145
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-actions] {
|
|
1149
|
+
grid-column: 2;
|
|
1150
|
+
grid-row: 1 / span 2;
|
|
1151
|
+
align-self: start;
|
|
1152
|
+
display: flex;
|
|
1153
|
+
align-items: center;
|
|
1154
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-description] {
|
|
1108
1158
|
grid-column: 1;
|
|
1109
1159
|
grid-row: 2;
|
|
1110
1160
|
margin: 0;
|
|
@@ -1120,15 +1170,16 @@
|
|
|
1120
1170
|
/**
|
|
1121
1171
|
* An inner control, not a button (R2): the box is the glyph plus a step of
|
|
1122
1172
|
* air on each side, floored at the WCAG 2.2 minimum, and the glyph is
|
|
1123
|
-
*
|
|
1173
|
+
* centerd in it. It was the control height before, a thirty-four pixel
|
|
1124
1174
|
* square beside a sixteen pixel mark. The glyph is the binding's `Glyph` in
|
|
1125
1175
|
* an `icon` box, sized here through the icon token so the box and the
|
|
1126
1176
|
* formula above read one length.
|
|
1127
1177
|
*/
|
|
1128
|
-
[data-ui
|
|
1178
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close] {
|
|
1129
1179
|
--slotted-icon-size: var(--_icon-size);
|
|
1130
1180
|
|
|
1131
|
-
|
|
1181
|
+
/* The last column, beside the actions when there are any. */
|
|
1182
|
+
grid-column: -2;
|
|
1132
1183
|
grid-row: 1 / span 2;
|
|
1133
1184
|
align-self: start;
|
|
1134
1185
|
display: inline-grid;
|
|
@@ -1153,24 +1204,24 @@
|
|
|
1153
1204
|
}
|
|
1154
1205
|
|
|
1155
1206
|
/* On a finger the target is the comfortable size in both axes and the box
|
|
1156
|
-
is the one a mouse sees: a transparent `::before`
|
|
1207
|
+
is the one a mouse sees: a transparent `::before` centerd on the control
|
|
1157
1208
|
reaches 44 pixels, and the ground and the ring stay square. */
|
|
1158
1209
|
@media (pointer: coarse) {
|
|
1159
|
-
[data-ui
|
|
1210
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close] {
|
|
1160
1211
|
position: relative;
|
|
1161
1212
|
}
|
|
1162
1213
|
|
|
1163
|
-
[data-ui
|
|
1214
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close]::before {
|
|
1164
1215
|
content: '';
|
|
1165
1216
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
1166
1217
|
position: absolute;
|
|
1167
1218
|
}
|
|
1168
1219
|
}
|
|
1169
1220
|
|
|
1170
|
-
[data-ui
|
|
1171
|
-
> [data-part
|
|
1172
|
-
> [data-part
|
|
1173
|
-
> [data-part
|
|
1221
|
+
[data-ui-drawer]
|
|
1222
|
+
> [data-part-panel]
|
|
1223
|
+
> [data-part-header]
|
|
1224
|
+
> [data-part-close]:not(:disabled):hover {
|
|
1174
1225
|
/* The ground moves under the pointer and nothing else does (R2). */
|
|
1175
1226
|
background-color: var(
|
|
1176
1227
|
--slotted-drawer-close-hover-background,
|
|
@@ -1178,20 +1229,17 @@
|
|
|
1178
1229
|
);
|
|
1179
1230
|
}
|
|
1180
1231
|
|
|
1181
|
-
[data-ui
|
|
1182
|
-
> [data-part
|
|
1183
|
-
> [data-part
|
|
1184
|
-
> [data-part
|
|
1232
|
+
[data-ui-drawer]
|
|
1233
|
+
> [data-part-panel]
|
|
1234
|
+
> [data-part-header]
|
|
1235
|
+
> [data-part-close]:not(:disabled):active {
|
|
1185
1236
|
background-color: var(
|
|
1186
1237
|
--slotted-drawer-close-active-background,
|
|
1187
1238
|
var(--slotted-tone-secondary-subtle-active)
|
|
1188
1239
|
);
|
|
1189
1240
|
}
|
|
1190
1241
|
|
|
1191
|
-
[data-ui
|
|
1192
|
-
> [data-part='panel']
|
|
1193
|
-
> [data-part='header']
|
|
1194
|
-
> [data-part='close']:focus-visible {
|
|
1242
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close]:focus-visible {
|
|
1195
1243
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1196
1244
|
outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
|
|
1197
1245
|
}
|
|
@@ -1204,7 +1252,7 @@
|
|
|
1204
1252
|
* `dismissable-layer` covers the modal case; this covers the other two, where
|
|
1205
1253
|
* the page behind is not locked at all.
|
|
1206
1254
|
*/
|
|
1207
|
-
[data-ui
|
|
1255
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-body] {
|
|
1208
1256
|
grid-row: 2;
|
|
1209
1257
|
min-block-size: 0;
|
|
1210
1258
|
min-inline-size: 0;
|
|
@@ -1221,11 +1269,11 @@
|
|
|
1221
1269
|
}
|
|
1222
1270
|
|
|
1223
1271
|
/* Content that brings its own inset — a page, a list on the panel's edges. */
|
|
1224
|
-
[data-ui
|
|
1272
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-body][data-inset='none'] {
|
|
1225
1273
|
padding: 0;
|
|
1226
1274
|
}
|
|
1227
1275
|
|
|
1228
|
-
[data-ui
|
|
1276
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-body]:not(:first-child) {
|
|
1229
1277
|
border-block-start: var(--_rule-size) solid
|
|
1230
1278
|
var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder));
|
|
1231
1279
|
}
|
|
@@ -1237,7 +1285,7 @@
|
|
|
1237
1285
|
* instead, and the header, the close button, Escape and the resizer all stay
|
|
1238
1286
|
* operable: a loading drawer a reader cannot leave is the worse failure.
|
|
1239
1287
|
*/
|
|
1240
|
-
[data-ui
|
|
1288
|
+
[data-ui-drawer][data-loading] > [data-part-panel] > [data-part-body] {
|
|
1241
1289
|
min-block-size: var(--slotted-space-12, 4rem);
|
|
1242
1290
|
}
|
|
1243
1291
|
|
|
@@ -1249,7 +1297,7 @@
|
|
|
1249
1297
|
* reason the middle one is bounded — an unbounded panel pushes it past the
|
|
1250
1298
|
* fold, which is the whole failure the three-row grid exists to prevent.
|
|
1251
1299
|
*/
|
|
1252
|
-
[data-ui
|
|
1300
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-footer] {
|
|
1253
1301
|
grid-row: 3;
|
|
1254
1302
|
display: flex;
|
|
1255
1303
|
flex-wrap: wrap;
|
|
@@ -1259,6 +1307,16 @@
|
|
|
1259
1307
|
padding-block: var(--_padding-block);
|
|
1260
1308
|
padding-inline: var(--_row-padding-inline-start) var(--_row-padding-inline-end);
|
|
1261
1309
|
background: var(--slotted-drawer-footer-surface, var(--slotted-surface-sunken, Canvas));
|
|
1310
|
+
/* The body scrolls under the footer; the panel's own filter blurs only what lies behind the panel. */
|
|
1311
|
+
-webkit-backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
|
|
1312
|
+
backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
1316
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-footer] {
|
|
1317
|
+
-webkit-backdrop-filter: none;
|
|
1318
|
+
backdrop-filter: none;
|
|
1319
|
+
}
|
|
1262
1320
|
}
|
|
1263
1321
|
|
|
1264
1322
|
/**
|
|
@@ -1274,18 +1332,18 @@
|
|
|
1274
1332
|
* above it and the header already clears it; the body scrolls, so an inset on
|
|
1275
1333
|
* it would be padding inside a scrollport rather than under it.
|
|
1276
1334
|
*/
|
|
1277
|
-
[data-ui
|
|
1335
|
+
[data-ui-drawer][data-side='bottom'] > [data-part-panel] > [data-part-footer] {
|
|
1278
1336
|
padding-block-end: calc(
|
|
1279
1337
|
var(--_footer-padding-block, var(--_padding-block)) + env(safe-area-inset-bottom, 0px)
|
|
1280
1338
|
);
|
|
1281
1339
|
}
|
|
1282
1340
|
|
|
1283
|
-
[data-ui
|
|
1341
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-footer]:not(:first-child) {
|
|
1284
1342
|
border-block-start: var(--_rule-size) solid
|
|
1285
1343
|
var(--slotted-drawer-rule-color, var(--slotted-border-subtle, ButtonBorder));
|
|
1286
1344
|
}
|
|
1287
1345
|
|
|
1288
|
-
/* ── Forced
|
|
1346
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1289
1347
|
|
|
1290
1348
|
/**
|
|
1291
1349
|
* The theme remaps every token this family reads, so the only rule here is the
|
|
@@ -1295,9 +1353,312 @@
|
|
|
1295
1353
|
* border is read at, and gives the panel the three edges its side does not.
|
|
1296
1354
|
*/
|
|
1297
1355
|
@media (forced-colors: active) {
|
|
1298
|
-
[data-ui
|
|
1356
|
+
[data-ui-drawer] > [data-part-panel] {
|
|
1299
1357
|
border-width: var(--slotted-border-width-thick, 2px);
|
|
1300
1358
|
border-color: CanvasText;
|
|
1301
1359
|
}
|
|
1302
1360
|
}
|
|
1361
|
+
|
|
1362
|
+
/* ── The sheet on the platform's scroll ─────────────────────────────── */
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* An overlay sheet from the bottom that a hand moves (`data-drag`) is moved by
|
|
1366
|
+
* the platform's own scroll: the layer scrolls, a spacer the height of the
|
|
1367
|
+
* layer comes before the panel, and `scrollTop` is how much of the panel is
|
|
1368
|
+
* in sight. The stops are snap points that `attachSheetScroll` in
|
|
1369
|
+
* `@slotted/core/extent` lays out, so the finger, the fling and the landing
|
|
1370
|
+
* are the compositor's. The layer takes no press of its own: the scrim and
|
|
1371
|
+
* the panel do, and a touch on the panel scrolls the layer.
|
|
1372
|
+
*/
|
|
1373
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] {
|
|
1374
|
+
display: block;
|
|
1375
|
+
overflow-x: hidden;
|
|
1376
|
+
overflow-y: auto;
|
|
1377
|
+
overscroll-behavior: contain;
|
|
1378
|
+
scroll-snap-type: y mandatory;
|
|
1379
|
+
scroll-padding-block-end: var(--slotted-keyboard-inset, 0px);
|
|
1380
|
+
scrollbar-width: none;
|
|
1381
|
+
scroll-timeline: --slotted-drawer-sheet block;
|
|
1382
|
+
pointer-events: none;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* Opening and closing are a travel of the binding: the scroll lands on the
|
|
1387
|
+
* resting stop or on nothing at once, and the panel slides there from where
|
|
1388
|
+
* it was drawn, in the slide tokens (`attachSheetScroll`). The layer is kept
|
|
1389
|
+
* for as long as the exit takes. Leaving, nothing re-snaps: a re-snap would
|
|
1390
|
+
* lift the panel back into view on its way out.
|
|
1391
|
+
*/
|
|
1392
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] {
|
|
1393
|
+
--_reveal: content-visibility
|
|
1394
|
+
calc(var(--slotted-duration-long) + var(--slotted-duration-medium)) allow-discrete;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-open]) {
|
|
1398
|
+
scroll-snap-type: none;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
/* Nor before the stops are laid out: the opening scrolls up from out of sight, not from the panel's end. */
|
|
1402
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-sheet-ready]) {
|
|
1403
|
+
scroll-snap-type: none;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-open])
|
|
1407
|
+
> [data-part-panel] {
|
|
1408
|
+
translate: 0 0;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]::-webkit-scrollbar {
|
|
1412
|
+
display: none;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]::before {
|
|
1416
|
+
content: '';
|
|
1417
|
+
display: block;
|
|
1418
|
+
block-size: 100%;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
/* Fixed, so a touch on it scrolls nothing and a press on it is a press outside. */
|
|
1422
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
|
|
1423
|
+
position: fixed;
|
|
1424
|
+
inset: 0;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]:not([data-undimmed])
|
|
1428
|
+
> [data-part-backdrop] {
|
|
1429
|
+
pointer-events: auto;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* The panel clips its corners without being a scroll container, so what
|
|
1434
|
+
* sticks inside it sticks to the layer's scrollport: the screen. The measure
|
|
1435
|
+
* does not ease; nothing animates it, the scroll moves the panel. The second
|
|
1436
|
+
* shadow is the panel's surface below its edge, which a rubber band past the
|
|
1437
|
+
* highest stop shows instead of a gap.
|
|
1438
|
+
*/
|
|
1439
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-panel] {
|
|
1440
|
+
pointer-events: auto;
|
|
1441
|
+
scroll-snap-align: end;
|
|
1442
|
+
margin-inline: auto;
|
|
1443
|
+
overflow: clip;
|
|
1444
|
+
max-block-size: none;
|
|
1445
|
+
box-shadow:
|
|
1446
|
+
var(--slotted-shadow-lg),
|
|
1447
|
+
0 50vh 0 0 var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));
|
|
1448
|
+
transition:
|
|
1449
|
+
translate var(--_slide),
|
|
1450
|
+
border-start-start-radius var(--_move),
|
|
1451
|
+
border-start-end-radius var(--_move);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
|
|
1455
|
+
> [data-part-panel]
|
|
1456
|
+
> [data-part-footer] {
|
|
1457
|
+
position: sticky;
|
|
1458
|
+
/* A close lands the scroll at once and slides the panel with a transform,
|
|
1459
|
+
which sticky positioning ignores: the travel's length holds the footer
|
|
1460
|
+
where it rested in the panel (`--slotted-drawer-sheet-travel`). */
|
|
1461
|
+
inset-block-end: calc(
|
|
1462
|
+
var(--slotted-keyboard-inset, 0px) - var(--slotted-drawer-sheet-travel, 0px)
|
|
1463
|
+
);
|
|
1464
|
+
z-index: 1;
|
|
1465
|
+
background: var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* `drag="panel"`: one scroll for the sheet and what it holds, Android's
|
|
1470
|
+
* nested scrolling in a single scroller. The panel is as tall as its content;
|
|
1471
|
+
* the body does not scroll on its own. A hand pushing up from a lower stop
|
|
1472
|
+
* lifts the sheet to the top of the screen and, without letting go, goes on
|
|
1473
|
+
* scrolling the content under the header that sticks there; pulling down
|
|
1474
|
+
* from the top of the content brings the sheet down. A panel taller than the
|
|
1475
|
+
* layer is a snap area larger than the snapport, so every position inside it
|
|
1476
|
+
* is a resting one. Content at rest past the top is read with the snap off
|
|
1477
|
+
* (`data-sheet-content`); going back below the top turns it on, and that
|
|
1478
|
+
* re-snap stops a fling out of the content at the top.
|
|
1479
|
+
*/
|
|
1480
|
+
/* The rows take their content and a last one what is left, so the content's end is read off its parts. */
|
|
1481
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'] > [data-part-panel] {
|
|
1482
|
+
block-size: auto;
|
|
1483
|
+
min-block-size: var(--slotted-drawer-sheet-height, 0px);
|
|
1484
|
+
grid-template-rows: auto auto auto auto minmax(0, 1fr);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/* `size="full"` is the screen: the footer rests at its bottom, in the row that takes what is left. */
|
|
1488
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-size='full']
|
|
1489
|
+
> [data-part-panel]
|
|
1490
|
+
> [data-part-footer] {
|
|
1491
|
+
grid-row: 5;
|
|
1492
|
+
align-self: end;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-scrolls]
|
|
1496
|
+
> [data-part-panel] {
|
|
1497
|
+
scroll-snap-align: start;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
/* Content at rest past the top: the snap is off so a layout does not re-snap it to the top. */
|
|
1501
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-content] {
|
|
1502
|
+
scroll-snap-type: none;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/* No finger on content at rest: the spacer folds, and the top of the content is an edge. */
|
|
1506
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-anchored]::before {
|
|
1507
|
+
block-size: 0;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1511
|
+
> [data-part-panel]
|
|
1512
|
+
> [data-part-body] {
|
|
1513
|
+
overflow: visible;
|
|
1514
|
+
overscroll-behavior: auto;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1518
|
+
> [data-part-panel]
|
|
1519
|
+
> [data-part-resizer] {
|
|
1520
|
+
position: sticky;
|
|
1521
|
+
inset-block-start: 0;
|
|
1522
|
+
z-index: 2;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1526
|
+
> [data-part-panel]
|
|
1527
|
+
> [data-part-header] {
|
|
1528
|
+
position: sticky;
|
|
1529
|
+
inset-block-start: 0;
|
|
1530
|
+
z-index: 1;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* At rest the panel's own surface is behind the resizer and the header, and
|
|
1535
|
+
* a second coat of a translucent surface read as a darker band. They paint
|
|
1536
|
+
* one only once the content passes under them (`data-stuck`), in tokens of
|
|
1537
|
+
* their own, as the footer has: a frosted theme gives them a blur and a
|
|
1538
|
+
* lighter fill there.
|
|
1539
|
+
*/
|
|
1540
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1541
|
+
> [data-part-panel]
|
|
1542
|
+
> :is([data-part-resizer], [data-part-header])[data-stuck] {
|
|
1543
|
+
background: var(
|
|
1544
|
+
--slotted-drawer-header-surface,
|
|
1545
|
+
var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas))
|
|
1546
|
+
);
|
|
1547
|
+
-webkit-backdrop-filter: var(--slotted-drawer-header-backdrop-filter, none);
|
|
1548
|
+
backdrop-filter: var(--slotted-drawer-header-backdrop-filter, none);
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
1552
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1553
|
+
> [data-part-panel]
|
|
1554
|
+
> :is([data-part-resizer], [data-part-header])[data-stuck] {
|
|
1555
|
+
-webkit-backdrop-filter: none;
|
|
1556
|
+
backdrop-filter: none;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1561
|
+
> [data-part-panel]:has(> [data-part-resizer])
|
|
1562
|
+
> [data-part-header] {
|
|
1563
|
+
inset-block-start: var(--_resizer-thickness);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* `drag="resizer"`: only the grabber moves the sheet. The panel is laid out at
|
|
1568
|
+
* the highest stop and the body scrolls inside it, at the highest stop only.
|
|
1569
|
+
*/
|
|
1570
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']
|
|
1571
|
+
> [data-part-panel] {
|
|
1572
|
+
block-size: var(--slotted-drawer-sheet-height, auto);
|
|
1573
|
+
touch-action: none;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']
|
|
1577
|
+
> [data-part-panel]
|
|
1578
|
+
> [data-part-body] {
|
|
1579
|
+
touch-action: pan-y;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='resizer']:not(
|
|
1583
|
+
[data-top-stop]
|
|
1584
|
+
)
|
|
1585
|
+
> [data-part-panel]
|
|
1586
|
+
> [data-part-body] {
|
|
1587
|
+
overflow: hidden;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
|
|
1591
|
+
> [data-part-panel]
|
|
1592
|
+
> [data-part-resizer] {
|
|
1593
|
+
touch-action: pan-y;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/* Every region inside the sheet passes its block-axis overscroll on to the sheet, a family's own `contain` included. */
|
|
1597
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1598
|
+
> [data-part-panel]
|
|
1599
|
+
* {
|
|
1600
|
+
overscroll-behavior-y: auto;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/* A region the consumer keeps from the sheet: its own scroll never passes on to it. */
|
|
1604
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] [data-drawer-drag='none'] {
|
|
1605
|
+
overscroll-behavior: contain;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
|
|
1609
|
+
> [data-part-stops]
|
|
1610
|
+
[data-part-stop] {
|
|
1611
|
+
position: absolute;
|
|
1612
|
+
inset-inline: 0;
|
|
1613
|
+
block-size: 0;
|
|
1614
|
+
scroll-snap-align: start;
|
|
1615
|
+
pointer-events: none;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* The scrim dims with the sheet: out of sight it is clear, at the lowest stop
|
|
1620
|
+
* it is whole. The element keeps the fade it opens and closes with; the
|
|
1621
|
+
* scroll drives a layer inside it, and the two multiply.
|
|
1622
|
+
*/
|
|
1623
|
+
@supports (animation-timeline: scroll()) {
|
|
1624
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
|
|
1625
|
+
background: none;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
|
|
1629
|
+
> [data-part-backdrop]::before {
|
|
1630
|
+
content: '';
|
|
1631
|
+
position: absolute;
|
|
1632
|
+
inset: 0;
|
|
1633
|
+
/* A decoration: unthemed, it is not painted rather than painted in a system color. */
|
|
1634
|
+
background: var(--slotted-drawer-scrim, var(--slotted-scrim));
|
|
1635
|
+
animation: slotted-drawer-sheet-dim linear both;
|
|
1636
|
+
animation-timeline: --slotted-drawer-sheet;
|
|
1637
|
+
animation-range: 0px var(--slotted-drawer-sheet-floor, 100%);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
/* Reading content, the sheet is at the top: the scrim is whole, wherever the scroll is. */
|
|
1641
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-sheet-content]
|
|
1642
|
+
> [data-part-backdrop]::before {
|
|
1643
|
+
animation: none;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/* Along a travel the scroll has already landed: the binding animates the layer
|
|
1647
|
+
with the panel, from the value held here for the first frame. */
|
|
1648
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-sheet-travel]
|
|
1649
|
+
> [data-part-backdrop]::before {
|
|
1650
|
+
animation: none;
|
|
1651
|
+
opacity: var(--slotted-drawer-sheet-dim, 1);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
@keyframes slotted-drawer-sheet-dim {
|
|
1656
|
+
from {
|
|
1657
|
+
opacity: 0;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
to {
|
|
1661
|
+
opacity: 1;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1303
1664
|
}
|