@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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 +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- 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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -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 +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -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 +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- 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 +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- 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 +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- 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 +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -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 +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -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 +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- 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 +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- 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 +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -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 +113 -89
- package/src/tag/tag.tokens.json +11 -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 +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"--slotted-app-shell-row-inset",
|
|
6
6
|
"--slotted-app-shell-row-line-height",
|
|
7
7
|
"--slotted-app-shell-row-mark",
|
|
8
|
+
"--slotted-app-shell-row-ring-inset",
|
|
8
9
|
"--slotted-border-subtle",
|
|
9
10
|
"--slotted-border-width-thin",
|
|
10
11
|
"--slotted-control-font-family",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"--slotted-space-7",
|
|
78
79
|
"--slotted-surface-raised",
|
|
79
80
|
"--slotted-text",
|
|
81
|
+
"--slotted-text-box-edge",
|
|
80
82
|
"--slotted-text-muted",
|
|
81
83
|
"--slotted-tone-accent-solid",
|
|
82
84
|
"--slotted-tone-accent-surface",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* one thing a placeholder means: a surface that is not available yet. It
|
|
10
10
|
* carries a cost, and the rim is what pays it — in the `high-contrast`
|
|
11
11
|
* scheme that token is the page's own white, so a fill alone would be an
|
|
12
|
-
* invisible box. `--slotted-border-subtle` is the fill's own
|
|
12
|
+
* invisible box. `--slotted-border-subtle` is the fill's own color in
|
|
13
13
|
* light, a faint step in dark, and black in high contrast: a rim that
|
|
14
14
|
* appears exactly where the fill stops working and adds no noise where it
|
|
15
15
|
* does.
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
* Geometry is left unguarded because a loaded placeholder is
|
|
24
24
|
* `display: contents` and has no box for it to describe.
|
|
25
25
|
*/
|
|
26
|
-
[data-ui
|
|
27
|
-
[data-ui
|
|
26
|
+
[data-ui-skeleton][data-part-root][data-loading],
|
|
27
|
+
[data-ui-skeleton][data-part-text][data-loading] [data-part-line] {
|
|
28
28
|
/**
|
|
29
|
-
* The unavailable surface, pushed a little toward the text
|
|
29
|
+
* The unavailable surface, pushed a little toward the text color. The
|
|
30
30
|
* token alone is not enough and the first dark capture is why: in the dark
|
|
31
31
|
* scheme `--slotted-disabled-background` is `#18181b` over a `#131316`
|
|
32
32
|
* ground, one step apart, and a page of placeholders read as an empty
|
|
33
33
|
* page. Mixing toward `--slotted-text` moves away from the ground in every
|
|
34
|
-
* scheme, because the text
|
|
34
|
+
* scheme, because the text color is the far end of each scheme's own
|
|
35
35
|
* range — darker in light, lighter in dark, black in high contrast.
|
|
36
36
|
*
|
|
37
37
|
* Eight per cent, measured rather than chosen. In oklab lightness the
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
);
|
|
52
52
|
--_edge: var(--slotted-skeleton-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
53
53
|
/**
|
|
54
|
-
* A shimmer needs a second
|
|
54
|
+
* A shimmer needs a second color, and in August this family declined to
|
|
55
55
|
* have one on the grounds that the theme did not own it. It does: the band
|
|
56
56
|
* is the fill carried further along the same axis the fill was derived on,
|
|
57
57
|
* so it separates from the fill in every scheme without a token of its own.
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
* because the two are the same white in light and a full step apart in
|
|
72
72
|
* dark, which is where the pulse was too quiet to see.
|
|
73
73
|
*
|
|
74
|
-
* A
|
|
74
|
+
* A color rather than an opacity, and that is a correction rather than a
|
|
75
75
|
* preference. The pulse used to fade the whole box, which flickered in the
|
|
76
76
|
* dark scheme: the rim faded with the fill, so once every cycle the shape
|
|
77
77
|
* came within a hair of the ground and then came back. Painting the
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
* can be.
|
|
101
101
|
*/
|
|
102
102
|
|
|
103
|
-
[data-ui
|
|
103
|
+
[data-ui-skeleton][data-part-root] {
|
|
104
104
|
display: inline-block;
|
|
105
105
|
/* Never a negative or zero box, whatever the consumer's value resolves
|
|
106
106
|
to. A placeholder that cannot be seen cannot be corrected. */
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* A bar the height of the type it is placed in, sitting on that type's
|
|
112
|
-
* optical
|
|
112
|
+
* optical center rather than on its baseline — the correction `link` derives
|
|
113
113
|
* for the marker it draws beside a word, for the same reason: an inline box
|
|
114
|
-
* is aligned by its bottom edge, and
|
|
114
|
+
* is aligned by its bottom edge, and centering it on the cap line is what
|
|
115
115
|
* puts it where the reader expects the word to be.
|
|
116
116
|
*
|
|
117
117
|
* There is no size axis here on purpose. `1em` is the size of whatever type
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
* own — an axis would have been a coarser second copy of the type scale that
|
|
120
120
|
* a consumer could set to the wrong value.
|
|
121
121
|
*/
|
|
122
|
-
[data-ui
|
|
122
|
+
[data-ui-skeleton][data-part-root][data-shape='text'] {
|
|
123
123
|
--_line: var(--slotted-skeleton-line-size, 1cap);
|
|
124
124
|
|
|
125
125
|
block-size: var(--slotted-skeleton-block-size, var(--_line));
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
* Zero for the default bar, and that is the point rather than an accident:
|
|
130
130
|
* a box one cap tall, aligned on the baseline, occupies exactly the band a
|
|
131
131
|
* capital letter occupies. The expression stays because a consumer who
|
|
132
|
-
* overrides the height still wants it
|
|
132
|
+
* overrides the height still wants it centerd on the same band.
|
|
133
133
|
*/
|
|
134
134
|
vertical-align: calc(0.5cap - 0.5 * var(--_line));
|
|
135
135
|
}
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
* placeholder that resolved to nothing would be a hole in the page that no
|
|
141
141
|
* capture and no reader could point at.
|
|
142
142
|
*/
|
|
143
|
-
[data-ui
|
|
143
|
+
[data-ui-skeleton][data-part-root][data-shape='block'] {
|
|
144
144
|
block-size: var(--slotted-skeleton-block-size, auto);
|
|
145
145
|
border-radius: var(--slotted-skeleton-radius, var(--slotted-radius-md, 6px));
|
|
146
146
|
display: block;
|
|
@@ -155,15 +155,15 @@
|
|
|
155
155
|
* `--slotted-avatar-size`: setting it on a container must not resize the real
|
|
156
156
|
* avatars standing beside the placeholders.
|
|
157
157
|
*/
|
|
158
|
-
[data-ui
|
|
159
|
-
[data-ui
|
|
158
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'],
|
|
159
|
+
[data-ui-skeleton][data-part-root][data-shape='square'] {
|
|
160
160
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-md, 36px));
|
|
161
161
|
|
|
162
162
|
block-size: var(--slotted-skeleton-block-size, var(--_size));
|
|
163
163
|
inline-size: var(--slotted-skeleton-inline-size, var(--_size));
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
[data-ui
|
|
166
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'] {
|
|
167
167
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -172,34 +172,34 @@
|
|
|
172
172
|
* step of the radius scale: six pixels is a gentle round on a 64-pixel square
|
|
173
173
|
* and a quarter-circle on a 20-pixel one.
|
|
174
174
|
*/
|
|
175
|
-
[data-ui
|
|
175
|
+
[data-ui-skeleton][data-part-root][data-shape='square'] {
|
|
176
176
|
border-radius: var(--slotted-skeleton-radius, calc(var(--_size) / 6));
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
/* ── The size steps, which mean something only for the two round shapes ── */
|
|
180
180
|
|
|
181
|
-
[data-ui
|
|
182
|
-
[data-ui
|
|
181
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'][data-size='xs'],
|
|
182
|
+
[data-ui-skeleton][data-part-root][data-shape='square'][data-size='xs'] {
|
|
183
183
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-xs, 24px));
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
[data-ui
|
|
187
|
-
[data-ui
|
|
186
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'][data-size='sm'],
|
|
187
|
+
[data-ui-skeleton][data-part-root][data-shape='square'][data-size='sm'] {
|
|
188
188
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-sm, 28px));
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
[data-ui
|
|
192
|
-
[data-ui
|
|
191
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'][data-size='md'],
|
|
192
|
+
[data-ui-skeleton][data-part-root][data-shape='square'][data-size='md'] {
|
|
193
193
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-md, 36px));
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
[data-ui
|
|
197
|
-
[data-ui
|
|
196
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'][data-size='lg'],
|
|
197
|
+
[data-ui-skeleton][data-part-root][data-shape='square'][data-size='lg'] {
|
|
198
198
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-lg, 48px));
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
[data-ui
|
|
202
|
-
[data-ui
|
|
201
|
+
[data-ui-skeleton][data-part-root][data-shape='circle'][data-size='xl'],
|
|
202
|
+
[data-ui-skeleton][data-part-root][data-shape='square'][data-size='xl'] {
|
|
203
203
|
--_size: var(--slotted-skeleton-size, var(--slotted-avatar-size-xl, 64px));
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -215,15 +215,34 @@
|
|
|
215
215
|
* available: a consumer covering a paragraph that has not been measured
|
|
216
216
|
* still sets one.
|
|
217
217
|
*/
|
|
218
|
-
[data-ui
|
|
218
|
+
[data-ui-skeleton][data-part-root][data-loading]:not(:empty) {
|
|
219
219
|
block-size: var(--slotted-skeleton-block-size, auto);
|
|
220
|
+
/* The rim stands outside the content's box and takes no room: a negative
|
|
221
|
+
margin of its own width gives back what the border adds, so the box
|
|
222
|
+
occupies exactly the place of what it covers. */
|
|
223
|
+
margin: calc(-1 * var(--slotted-skeleton-border-width, var(--slotted-border-width-thin, 1px)));
|
|
220
224
|
/* An element child is hidden by `visibility`; a bare text node is not an
|
|
221
|
-
element and can only be hidden by taking the
|
|
225
|
+
element and can only be hidden by taking the color away. */
|
|
222
226
|
color: transparent;
|
|
223
227
|
inline-size: var(--slotted-skeleton-inline-size, auto);
|
|
224
228
|
}
|
|
225
229
|
|
|
226
|
-
|
|
230
|
+
/**
|
|
231
|
+
* A single covered element is an item of the box, as it is an item of the
|
|
232
|
+
* page's own layout once the box is `display: contents`. Left inline, it
|
|
233
|
+
* stands on the line of the type around it and the box is as tall as that
|
|
234
|
+
* line.
|
|
235
|
+
*/
|
|
236
|
+
[data-ui-skeleton][data-part-root][data-loading]:has(> :only-child) {
|
|
237
|
+
display: inline-grid;
|
|
238
|
+
grid-auto-flow: column;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[data-ui-skeleton][data-part-root][data-loading][data-shape='block']:has(> :only-child) {
|
|
242
|
+
display: grid;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
[data-ui-skeleton][data-part-root][data-loading]:not(:empty) > * {
|
|
227
246
|
visibility: hidden;
|
|
228
247
|
}
|
|
229
248
|
|
|
@@ -240,14 +259,14 @@
|
|
|
240
259
|
* paragraph of them read as a barcode because real prose fills a little over
|
|
241
260
|
* half its leading. A capital's height is where the ink actually is.
|
|
242
261
|
*/
|
|
243
|
-
[data-ui
|
|
262
|
+
[data-ui-skeleton][data-part-text] {
|
|
244
263
|
align-items: center;
|
|
245
264
|
display: grid;
|
|
246
265
|
grid-auto-rows: var(--slotted-skeleton-row-size, 1lh);
|
|
247
266
|
inline-size: var(--slotted-skeleton-inline-size, 100%);
|
|
248
267
|
}
|
|
249
268
|
|
|
250
|
-
[data-ui
|
|
269
|
+
[data-ui-skeleton] [data-part-line] {
|
|
251
270
|
block-size: var(--slotted-skeleton-line-size, 1cap);
|
|
252
271
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
253
272
|
inline-size: 100%;
|
|
@@ -259,7 +278,7 @@
|
|
|
259
278
|
* TypeScript and Carbon does not guard at all: one line shortened by itself
|
|
260
279
|
* stands for a sentence that was never there.
|
|
261
280
|
*/
|
|
262
|
-
[data-ui
|
|
281
|
+
[data-ui-skeleton] [data-part-line]:last-child:not(:only-child) {
|
|
263
282
|
inline-size: var(--slotted-skeleton-last-line-size, 62%);
|
|
264
283
|
}
|
|
265
284
|
|
|
@@ -271,8 +290,8 @@
|
|
|
271
290
|
* nothing. One declaration answers both, and neither answer remounts the
|
|
272
291
|
* consumer's content on the way through.
|
|
273
292
|
*/
|
|
274
|
-
[data-ui
|
|
275
|
-
[data-ui
|
|
293
|
+
[data-ui-skeleton][data-part-root]:not([data-loading]),
|
|
294
|
+
[data-ui-skeleton][data-part-text]:not([data-loading]) {
|
|
276
295
|
display: contents;
|
|
277
296
|
}
|
|
278
297
|
|
|
@@ -285,7 +304,7 @@
|
|
|
285
304
|
* pixels inside a 599-pixel column, every placeholder in it two pixels wide.
|
|
286
305
|
* The token is the way out for a region that really is inline.
|
|
287
306
|
*/
|
|
288
|
-
[data-ui
|
|
307
|
+
[data-ui-skeleton][data-part-region] {
|
|
289
308
|
inline-size: var(--slotted-skeleton-inline-size, 100%);
|
|
290
309
|
min-inline-size: 0;
|
|
291
310
|
}
|
|
@@ -308,17 +327,16 @@
|
|
|
308
327
|
* (0 to 1, a point in the cycle) is where a box starts, so a consumer that
|
|
309
328
|
* needs a late box in step, and a capture that needs one moment, can name it.
|
|
310
329
|
*/
|
|
311
|
-
[data-ui
|
|
312
|
-
[data-ui
|
|
313
|
-
[data-part='line'] {
|
|
330
|
+
[data-ui-skeleton][data-part-root][data-loading]:not([data-animation='none']),
|
|
331
|
+
[data-ui-skeleton][data-part-text][data-loading]:not([data-animation='none']) [data-part-line] {
|
|
314
332
|
overflow: clip;
|
|
315
333
|
position: relative;
|
|
316
334
|
}
|
|
317
335
|
|
|
318
|
-
[data-ui
|
|
319
|
-
[data-ui
|
|
320
|
-
[data-ui
|
|
321
|
-
[data-ui
|
|
336
|
+
[data-ui-skeleton][data-part-root][data-animation='pulse'][data-loading]::after,
|
|
337
|
+
[data-ui-skeleton][data-part-root][data-animation='shimmer'][data-loading]::after,
|
|
338
|
+
[data-ui-skeleton][data-animation='pulse'][data-loading] [data-part-line]::after,
|
|
339
|
+
[data-ui-skeleton][data-animation='shimmer'][data-loading] [data-part-line]::after {
|
|
322
340
|
animation-delay: calc(
|
|
323
341
|
var(--slotted-skeleton-phase, 0) * var(--slotted-duration-loop-slow) * -1
|
|
324
342
|
);
|
|
@@ -337,8 +355,8 @@
|
|
|
337
355
|
* at full strength and the shape never leaves the page. Zero at both ends of
|
|
338
356
|
* the cycle, so the seam where it wraps carries nothing to see.
|
|
339
357
|
*/
|
|
340
|
-
[data-ui
|
|
341
|
-
[data-ui
|
|
358
|
+
[data-ui-skeleton][data-part-root][data-animation='pulse'][data-loading]::after,
|
|
359
|
+
[data-ui-skeleton][data-animation='pulse'][data-loading] [data-part-line]::after {
|
|
342
360
|
animation-timing-function: ease-in-out;
|
|
343
361
|
background-color: var(--_trough);
|
|
344
362
|
opacity: 0;
|
|
@@ -355,8 +373,8 @@
|
|
|
355
373
|
* The travel is symmetric about the box, so a right-to-left box runs the same
|
|
356
374
|
* travel backwards; `transform` and the gradient have no logical form.
|
|
357
375
|
*/
|
|
358
|
-
[data-ui
|
|
359
|
-
[data-ui
|
|
376
|
+
[data-ui-skeleton][data-part-root][data-animation='shimmer'][data-loading]::after,
|
|
377
|
+
[data-ui-skeleton][data-animation='shimmer'][data-loading] [data-part-line]::after {
|
|
360
378
|
animation-timing-function: linear;
|
|
361
379
|
background-image: linear-gradient(
|
|
362
380
|
90deg,
|
|
@@ -366,21 +384,21 @@
|
|
|
366
384
|
);
|
|
367
385
|
}
|
|
368
386
|
|
|
369
|
-
[data-ui
|
|
370
|
-
[data-ui
|
|
387
|
+
[data-ui-skeleton][data-part-root][data-animation='shimmer'][data-loading]:dir(rtl)::after,
|
|
388
|
+
[data-ui-skeleton][data-animation='shimmer'][data-loading]:dir(rtl) [data-part-line]::after {
|
|
371
389
|
animation-direction: reverse;
|
|
372
390
|
}
|
|
373
391
|
|
|
374
392
|
/* Started only here: a reset under `reduce` is one attribute against the
|
|
375
393
|
four that select a layer, and lost, so the loop ran under reduced motion. */
|
|
376
394
|
@media (prefers-reduced-motion: no-preference) {
|
|
377
|
-
[data-ui
|
|
378
|
-
[data-ui
|
|
395
|
+
[data-ui-skeleton][data-part-root][data-animation='pulse'][data-loading]::after,
|
|
396
|
+
[data-ui-skeleton][data-animation='pulse'][data-loading] [data-part-line]::after {
|
|
379
397
|
animation-name: slotted-skeleton-pulse;
|
|
380
398
|
}
|
|
381
399
|
|
|
382
|
-
[data-ui
|
|
383
|
-
[data-ui
|
|
400
|
+
[data-ui-skeleton][data-part-root][data-animation='shimmer'][data-loading]::after,
|
|
401
|
+
[data-ui-skeleton][data-animation='shimmer'][data-loading] [data-part-line]::after {
|
|
384
402
|
animation-name: slotted-skeleton-sweep;
|
|
385
403
|
}
|
|
386
404
|
}
|
|
@@ -410,8 +428,8 @@
|
|
|
410
428
|
* stands outside the box, so the reader sees the fill alone.
|
|
411
429
|
*/
|
|
412
430
|
@media (prefers-reduced-motion: reduce) {
|
|
413
|
-
[data-ui
|
|
414
|
-
[data-ui
|
|
431
|
+
[data-ui-skeleton]::after,
|
|
432
|
+
[data-ui-skeleton] [data-part-line]::after {
|
|
415
433
|
animation: none;
|
|
416
434
|
}
|
|
417
435
|
}
|
|
@@ -420,11 +438,11 @@
|
|
|
420
438
|
* The theme remaps the fill to `Canvas` and the rim to `ButtonBorder`, so
|
|
421
439
|
* the box survives on its own. What does not survive is the gradient: a
|
|
422
440
|
* `background-image` is not replaced by the system palette, so a shimmer
|
|
423
|
-
* would go on painting a mixed
|
|
441
|
+
* would go on painting a mixed color over a forced one.
|
|
424
442
|
*/
|
|
425
443
|
@media (forced-colors: active) {
|
|
426
|
-
[data-ui
|
|
427
|
-
[data-ui
|
|
444
|
+
[data-ui-skeleton][data-part-root][data-loading]::after,
|
|
445
|
+
[data-ui-skeleton][data-part-text][data-loading] [data-part-line]::after {
|
|
428
446
|
background-image: none;
|
|
429
447
|
}
|
|
430
448
|
}
|