@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- 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 +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -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 +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -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 +204 -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 +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -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 +100 -26
- package/src/form/form.tokens.json +6 -1
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- 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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -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 +41 -27
- package/src/page/page.tokens.json +1 -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/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -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 +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- 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 +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 +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 +68 -74
- package/src/tour/tour.tokens.json +1 -0
- 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/card/card.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* The root does not clip. Media rounds the corners it touches and clips
|
|
14
14
|
* itself, so an overlay opened inside a card is not cut off by the card.
|
|
15
15
|
*/
|
|
16
|
-
[data-ui
|
|
16
|
+
[data-ui-card] {
|
|
17
17
|
--_card-edge-width: var(--slotted-card-border-width, var(--slotted-border-width-thin, 1px));
|
|
18
18
|
--_card-radius: var(--slotted-card-radius, var(--slotted-radius-lg, 8px));
|
|
19
19
|
--_card-inset-block: var(--slotted-card-padding-block, var(--slotted-space-6, 1rem));
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
* it survives `forced-colors`, where a shadow is removed outright, and it
|
|
100
100
|
* changes width without moving a pixel of content because it is out of flow.
|
|
101
101
|
*/
|
|
102
|
-
[data-ui
|
|
102
|
+
[data-ui-card]::before {
|
|
103
103
|
border: var(--_card-edge-width) solid var(--_card-edge);
|
|
104
104
|
border-radius: inherit;
|
|
105
105
|
content: '';
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
/* Density is the application's choice and governs control geometry; `size`
|
|
113
113
|
is this card's own inset, so a summary card and a card in a dense list can
|
|
114
114
|
stand on the same page. */
|
|
115
|
-
[data-ui
|
|
115
|
+
[data-ui-card][data-size='sm'] {
|
|
116
116
|
--_card-inset-block: var(--slotted-card-padding-block-sm, var(--slotted-space-5, 0.75rem));
|
|
117
117
|
--_card-inset-inline: var(--slotted-card-padding-inline-sm, var(--slotted-space-5, 0.75rem));
|
|
118
118
|
--_card-region-gap: var(--slotted-card-region-gap-sm, var(--slotted-space-2, 0.25rem));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
[data-ui
|
|
121
|
+
[data-ui-card][data-size='lg'] {
|
|
122
122
|
--_card-inset-block: var(--slotted-card-padding-block-lg, var(--slotted-space-8, 1.5rem));
|
|
123
123
|
--_card-inset-inline: var(--slotted-card-padding-inline-lg, var(--slotted-space-8, 1.5rem));
|
|
124
124
|
--_card-region-gap: var(--slotted-card-region-gap-lg, var(--slotted-space-4, 0.5rem));
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
* not separate on a white page, and `0 1px 3px rgb(0 0 0 / 0.5)` on a
|
|
134
134
|
* near-black one is invisible, so `elevated` and `outline` were one picture
|
|
135
135
|
* in both schemes. It keeps its hairline, because a shadow is removed under
|
|
136
|
-
* forced
|
|
136
|
+
* forced colors and an edge is not.
|
|
137
137
|
*/
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-card][data-fill='elevated'] {
|
|
139
139
|
--_card-shadow-rest: var(--slotted-card-shadow, var(--slotted-shadow-md));
|
|
140
140
|
/* The shadow moves and the edge holds still: elevation is what this fill
|
|
141
141
|
is made of. */
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
* being a card at all. A hairline that reads as slightly redundant in two
|
|
159
159
|
* schemes fails more loudly than a card that disappears in the third.
|
|
160
160
|
*/
|
|
161
|
-
[data-ui
|
|
161
|
+
[data-ui-card][data-fill='subtle'] {
|
|
162
162
|
--_card-surface-rest: var(
|
|
163
163
|
--slotted-card-background-subtle,
|
|
164
164
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -182,15 +182,15 @@
|
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
184
|
* A card is interactive when it holds a destination or a choice. Every state
|
|
185
|
-
* below was previously gated on `[data-part
|
|
185
|
+
* below was previously gated on `[data-part-link]` alone, so the chooser —
|
|
186
186
|
* a `<label>` around a native input, which is the whole-card selection this
|
|
187
187
|
* family documents — answered no hover, no press and no ring.
|
|
188
188
|
*
|
|
189
189
|
* The two guards are the state precedence: a disabled card does not answer
|
|
190
190
|
* the pointer, and neither does a card whose only control is disabled.
|
|
191
191
|
*/
|
|
192
|
-
[data-ui
|
|
193
|
-
:is([data-part
|
|
192
|
+
[data-ui-card]:not([data-disabled]):has(
|
|
193
|
+
:is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
|
|
194
194
|
):hover {
|
|
195
195
|
--_card-surface: var(--_card-surface-hover);
|
|
196
196
|
--_card-edge: var(--_card-edge-hover);
|
|
@@ -208,21 +208,19 @@
|
|
|
208
208
|
* not make. Anything a consumer raises above the hit area — `actions`, the
|
|
209
209
|
* `footer` — sets its own cursor, because it is its own target.
|
|
210
210
|
*/
|
|
211
|
-
[data-ui
|
|
212
|
-
:is([data-part
|
|
211
|
+
[data-ui-card]:not([data-disabled]):has(
|
|
212
|
+
:is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
|
|
213
213
|
) {
|
|
214
214
|
cursor: pointer;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
[data-ui
|
|
218
|
-
[data-part='selection'] :is(input, button):not(:disabled)
|
|
219
|
-
)
|
|
217
|
+
[data-ui-card]:not([data-disabled]):has([data-part-selection] :is(input, button):not(:disabled))
|
|
220
218
|
:where(*) {
|
|
221
219
|
cursor: inherit;
|
|
222
220
|
}
|
|
223
221
|
|
|
224
|
-
[data-ui
|
|
225
|
-
:is([data-part
|
|
222
|
+
[data-ui-card]:not([data-disabled]):has(
|
|
223
|
+
:is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
|
|
226
224
|
):active {
|
|
227
225
|
--_card-surface: var(--_card-surface-active);
|
|
228
226
|
--_card-edge: var(--_card-edge-active);
|
|
@@ -235,7 +233,7 @@
|
|
|
235
233
|
* nothing instead of leaving its gap behind — the case a three-region layout
|
|
236
234
|
* usually gets wrong.
|
|
237
235
|
*/
|
|
238
|
-
[data-ui
|
|
236
|
+
[data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]) {
|
|
239
237
|
min-inline-size: 0;
|
|
240
238
|
padding-block: var(--_card-region-gap);
|
|
241
239
|
padding-inline: var(--_card-inset-inline);
|
|
@@ -244,19 +242,16 @@
|
|
|
244
242
|
/* A region at either end absorbs the padding its missing neighbour would
|
|
245
243
|
have carried, so a card of only a body is not visibly tighter than a full
|
|
246
244
|
one. Media bleeds, so the region next to it counts as an end. */
|
|
247
|
-
[data-ui
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
+ :is([data-part='header'], [data-part='body'], [data-part='footer']) {
|
|
245
|
+
[data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):first-child,
|
|
246
|
+
[data-ui-card]
|
|
247
|
+
> [data-part-media]
|
|
248
|
+
+ :is([data-part-header], [data-part-body], [data-part-footer]) {
|
|
252
249
|
padding-block-start: var(--_card-inset-block);
|
|
253
250
|
}
|
|
254
251
|
|
|
255
|
-
[data-ui
|
|
256
|
-
[data-ui
|
|
257
|
-
> :is([data-part
|
|
258
|
-
+ [data-part='media']
|
|
259
|
-
) {
|
|
252
|
+
[data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):last-child,
|
|
253
|
+
[data-ui-card]
|
|
254
|
+
> :is([data-part-header], [data-part-body], [data-part-footer]):has(+ [data-part-media]) {
|
|
260
255
|
padding-block-end: var(--_card-inset-block);
|
|
261
256
|
}
|
|
262
257
|
|
|
@@ -266,7 +261,7 @@
|
|
|
266
261
|
* badge, a status, a menu button. Both are Typography and both are the
|
|
267
262
|
* consumer's, so the header decides only the two distances and the corner.
|
|
268
263
|
*/
|
|
269
|
-
[data-ui
|
|
264
|
+
[data-ui-card] > [data-part-header] {
|
|
270
265
|
align-items: start;
|
|
271
266
|
column-gap: var(--slotted-card-header-column-gap, var(--slotted-space-5, 0.75rem));
|
|
272
267
|
display: grid;
|
|
@@ -274,7 +269,13 @@
|
|
|
274
269
|
row-gap: var(--slotted-card-header-gap, var(--slotted-space-2, 0.25rem));
|
|
275
270
|
}
|
|
276
271
|
|
|
277
|
-
|
|
272
|
+
/* A column gap is drawn beside an empty track too, so a header with no corner
|
|
273
|
+
keeps no corner column. */
|
|
274
|
+
[data-ui-card] > [data-part-header]:not(:has(> [data-part-actions])) {
|
|
275
|
+
grid-template-columns: minmax(0, 1fr);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
[data-ui-card] > [data-part-header] > * {
|
|
278
279
|
grid-column: 1;
|
|
279
280
|
min-inline-size: 0;
|
|
280
281
|
}
|
|
@@ -282,14 +283,14 @@
|
|
|
282
283
|
/* The corner. It stays on the first row, so a title that wraps to two lines
|
|
283
284
|
does not drag the badge down with it, and it takes the last column whether
|
|
284
285
|
the header has two or three. */
|
|
285
|
-
[data-ui
|
|
286
|
+
[data-ui-card] > [data-part-header] > [data-part-actions] {
|
|
286
287
|
align-items: center;
|
|
287
288
|
display: flex;
|
|
288
289
|
flex-wrap: wrap;
|
|
289
|
-
/*
|
|
290
|
+
/* Centerd on the title's own row rather than on the row's start edge: a
|
|
290
291
|
badge aligned to the line box sits optically high against cap height. */
|
|
291
292
|
align-self: center;
|
|
292
|
-
gap: var(--slotted-card-actions-gap, var(--slotted-
|
|
293
|
+
gap: var(--slotted-card-actions-gap, var(--slotted-action-gap, 8px));
|
|
293
294
|
grid-column: -2 / -1;
|
|
294
295
|
grid-row: 1;
|
|
295
296
|
/* Above the stretched hit area, like the footer: a control in the corner
|
|
@@ -307,19 +308,23 @@
|
|
|
307
308
|
* Carbon, Fluent and Cloudscape trail only because none of them keeps a
|
|
308
309
|
* corner in the header.
|
|
309
310
|
*/
|
|
310
|
-
[data-ui
|
|
311
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]) {
|
|
311
312
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
312
313
|
}
|
|
313
314
|
|
|
314
|
-
[data-ui
|
|
315
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]):not(:has(> [data-part-actions])) {
|
|
316
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]) > * {
|
|
315
320
|
grid-column: 2;
|
|
316
321
|
}
|
|
317
322
|
|
|
318
|
-
[data-ui
|
|
323
|
+
[data-ui-card] > [data-part-header] > [data-part-selection] {
|
|
319
324
|
/**
|
|
320
325
|
* On the title's first line, not in the middle of its block (C1, the rule
|
|
321
326
|
* R5 gives every mark beside a title): the slot is one line of the title's
|
|
322
|
-
* step tall and
|
|
327
|
+
* step tall and centers the control inside it, so a title that wraps to
|
|
323
328
|
* two lines keeps its control beside the first. The step is the large one,
|
|
324
329
|
* which is the title a card header holds; a header set at another step
|
|
325
330
|
* retunes the line with the family token.
|
|
@@ -359,7 +364,7 @@
|
|
|
359
364
|
* is the card: the surface is the `<label>`, so the hit area is the whole
|
|
360
365
|
* card, which is the correction the token foundation asks a family to make.
|
|
361
366
|
*/
|
|
362
|
-
[data-ui
|
|
367
|
+
[data-ui-card] > [data-part-header] > [data-part-selection] > :is(input, button) {
|
|
363
368
|
block-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
|
|
364
369
|
inline-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
|
|
365
370
|
margin: 0;
|
|
@@ -367,16 +372,16 @@
|
|
|
367
372
|
|
|
368
373
|
/* Cards stretched to a common height in a grid keep their footers on one
|
|
369
374
|
line, because the body takes the leftover. */
|
|
370
|
-
[data-ui
|
|
375
|
+
[data-ui-card] > [data-part-body] {
|
|
371
376
|
flex: 1 1 auto;
|
|
372
377
|
min-block-size: 0;
|
|
373
378
|
}
|
|
374
379
|
|
|
375
|
-
[data-ui
|
|
380
|
+
[data-ui-card] > [data-part-footer] {
|
|
376
381
|
align-items: center;
|
|
377
382
|
display: flex;
|
|
378
383
|
flex-wrap: wrap;
|
|
379
|
-
gap: var(--slotted-card-footer-gap, var(--slotted-
|
|
384
|
+
gap: var(--slotted-card-footer-gap, var(--slotted-action-gap, 8px));
|
|
380
385
|
/* Above the stretched hit area: a secondary action belongs in the footer
|
|
381
386
|
and has to stay operable while the card resolves to somewhere else. */
|
|
382
387
|
position: relative;
|
|
@@ -388,21 +393,21 @@
|
|
|
388
393
|
* region's own, and `inset` on the rule lines it up with the text instead.
|
|
389
394
|
* The regions on either side keep the distance they already had.
|
|
390
395
|
*/
|
|
391
|
-
[data-ui
|
|
396
|
+
[data-ui-card] > [data-ui-divider] {
|
|
392
397
|
flex-shrink: 0;
|
|
393
398
|
}
|
|
394
399
|
|
|
395
|
-
[data-ui
|
|
400
|
+
[data-ui-card][data-orientation='horizontal'] > [data-ui-divider] {
|
|
396
401
|
grid-column: 2;
|
|
397
402
|
}
|
|
398
403
|
|
|
399
|
-
[data-ui
|
|
404
|
+
[data-ui-card] > [data-part-media] {
|
|
400
405
|
display: block;
|
|
401
406
|
min-inline-size: 0;
|
|
402
407
|
overflow: hidden;
|
|
403
408
|
}
|
|
404
409
|
|
|
405
|
-
[data-ui
|
|
410
|
+
[data-ui-card] > [data-part-media] > :is(img, video, canvas, picture, svg) {
|
|
406
411
|
block-size: 100%;
|
|
407
412
|
display: block;
|
|
408
413
|
inline-size: 100%;
|
|
@@ -411,12 +416,12 @@
|
|
|
411
416
|
|
|
412
417
|
/* The media rounds the corners it touches and no others. The radius is the
|
|
413
418
|
card's own, less the edge it sits inside. */
|
|
414
|
-
[data-ui
|
|
419
|
+
[data-ui-card] > [data-part-media]:first-child {
|
|
415
420
|
border-start-end-radius: var(--_card-radius);
|
|
416
421
|
border-start-start-radius: var(--_card-radius);
|
|
417
422
|
}
|
|
418
423
|
|
|
419
|
-
[data-ui
|
|
424
|
+
[data-ui-card] > [data-part-media]:last-child {
|
|
420
425
|
border-end-end-radius: var(--_card-radius);
|
|
421
426
|
border-end-start-radius: var(--_card-radius);
|
|
422
427
|
}
|
|
@@ -427,7 +432,7 @@
|
|
|
427
432
|
* three of the second. The fourth row is empty until the card reflows, and
|
|
428
433
|
* an empty row costs nothing because the rhythm is padding, not a gap.
|
|
429
434
|
*/
|
|
430
|
-
[data-ui
|
|
435
|
+
[data-ui-card][data-orientation='horizontal'] {
|
|
431
436
|
container-name: slotted-card;
|
|
432
437
|
container-type: inline-size;
|
|
433
438
|
display: grid;
|
|
@@ -443,7 +448,7 @@
|
|
|
443
448
|
grid-template-rows: repeat(4, auto);
|
|
444
449
|
}
|
|
445
450
|
|
|
446
|
-
[data-ui
|
|
451
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-media] {
|
|
447
452
|
border-end-end-radius: 0;
|
|
448
453
|
border-end-start-radius: var(--_card-radius);
|
|
449
454
|
border-start-end-radius: 0;
|
|
@@ -451,15 +456,15 @@
|
|
|
451
456
|
grid-area: 1 / 1 / -1 / 2;
|
|
452
457
|
}
|
|
453
458
|
|
|
454
|
-
[data-ui
|
|
459
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-header] {
|
|
455
460
|
grid-area: 1 / 2;
|
|
456
461
|
}
|
|
457
462
|
|
|
458
|
-
[data-ui
|
|
463
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-body] {
|
|
459
464
|
grid-area: 2 / 2;
|
|
460
465
|
}
|
|
461
466
|
|
|
462
|
-
[data-ui
|
|
467
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
|
|
463
468
|
grid-area: 3 / 2;
|
|
464
469
|
}
|
|
465
470
|
|
|
@@ -470,21 +475,21 @@
|
|
|
470
475
|
* a literal because CSS forbids a custom property in a container condition.
|
|
471
476
|
*/
|
|
472
477
|
@container slotted-card (max-inline-size: 24rem) {
|
|
473
|
-
[data-ui
|
|
478
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-media] {
|
|
474
479
|
border-end-start-radius: 0;
|
|
475
480
|
border-start-end-radius: var(--_card-radius);
|
|
476
481
|
grid-area: 1 / 1 / 2 / -1;
|
|
477
482
|
}
|
|
478
483
|
|
|
479
|
-
[data-ui
|
|
484
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-header] {
|
|
480
485
|
grid-area: 2 / 1 / 3 / -1;
|
|
481
486
|
}
|
|
482
487
|
|
|
483
|
-
[data-ui
|
|
488
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-body] {
|
|
484
489
|
grid-area: 3 / 1 / 4 / -1;
|
|
485
490
|
}
|
|
486
491
|
|
|
487
|
-
[data-ui
|
|
492
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
|
|
488
493
|
grid-area: 4 / 1 / 5 / -1;
|
|
489
494
|
}
|
|
490
495
|
}
|
|
@@ -495,7 +500,7 @@
|
|
|
495
500
|
* Enter, the context menu and middle-click are the platform's, and the name
|
|
496
501
|
* is the title rather than every string in the card.
|
|
497
502
|
*/
|
|
498
|
-
[data-ui
|
|
503
|
+
[data-ui-card] [data-part-link]::after {
|
|
499
504
|
content: '';
|
|
500
505
|
inset: 0;
|
|
501
506
|
position: absolute;
|
|
@@ -506,10 +511,10 @@
|
|
|
506
511
|
* inverse surface and sits on the edge. In this theme
|
|
507
512
|
* `--slotted-focus-ring-color` and `--slotted-tone-accent-border` resolve to
|
|
508
513
|
* the same hex, so a selected card and a focused card were the same image.
|
|
509
|
-
* They now differ in
|
|
514
|
+
* They now differ in color, in width and in position.
|
|
510
515
|
*/
|
|
511
|
-
[data-ui
|
|
512
|
-
:is([data-part
|
|
516
|
+
[data-ui-card]:has(
|
|
517
|
+
:is([data-part-link], [data-part-selection] :is(input, button)):focus-visible
|
|
513
518
|
) {
|
|
514
519
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
515
520
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
@@ -525,10 +530,8 @@
|
|
|
525
530
|
* surface. Carbon and Fluent avoid the pair by hiding the control outright,
|
|
526
531
|
* which is not open here — the control is meant to be seen.
|
|
527
532
|
*/
|
|
528
|
-
[data-ui
|
|
529
|
-
[data-ui
|
|
530
|
-
[data-part='selection']
|
|
531
|
-
:is(input, button):focus-visible {
|
|
533
|
+
[data-ui-card]:has([data-part-link]) [data-part-link]:focus-visible,
|
|
534
|
+
[data-ui-card]:has([data-part-selection]) [data-part-selection] :is(input, button):focus-visible {
|
|
532
535
|
outline: none;
|
|
533
536
|
}
|
|
534
537
|
|
|
@@ -550,7 +553,7 @@
|
|
|
550
553
|
* accent's hover and active tints, as a selected row's does, and the edge
|
|
551
554
|
* holds, because it is already saying the stronger thing.
|
|
552
555
|
*/
|
|
553
|
-
[data-ui
|
|
556
|
+
[data-ui-card][data-selected] {
|
|
554
557
|
--_card-surface-rest: var(
|
|
555
558
|
--slotted-card-background-selected,
|
|
556
559
|
var(--slotted-tone-accent-surface, Canvas)
|
|
@@ -583,7 +586,7 @@
|
|
|
583
586
|
* mute in every case, and the elevation drops to nothing — a card that cannot
|
|
584
587
|
* be used does not float above the page.
|
|
585
588
|
*/
|
|
586
|
-
[data-ui
|
|
589
|
+
[data-ui-card][data-disabled] {
|
|
587
590
|
--_card-surface: var(--_card-surface-disabled);
|
|
588
591
|
--_card-edge: var(
|
|
589
592
|
--slotted-card-border-color-disabled,
|
|
@@ -596,7 +599,7 @@
|
|
|
596
599
|
|
|
597
600
|
/* The card withdraws the hit area it added. Disabling the control itself is
|
|
598
601
|
the consumer's, because only the control can refuse an interaction. */
|
|
599
|
-
[data-ui
|
|
602
|
+
[data-ui-card][data-disabled] [data-part-link]::after {
|
|
600
603
|
display: none;
|
|
601
604
|
}
|
|
602
605
|
}
|