@slotted/styles 0.1.0-beta.1 → 0.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +35 -42
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +43 -35
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +356 -301
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +152 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +242 -239
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +132 -107
- package/src/combobox/combobox.tokens.json +1 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +210 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +148 -116
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +55 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +78 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +372 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +205 -210
- package/src/drawer/drawer.tokens.json +1 -0
- package/src/entity-picker/entity-picker.css +238 -241
- package/src/entity-picker/entity-picker.tokens.json +1 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +19 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +52 -28
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +30 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +83 -63
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +182 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +152 -145
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +84 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +323 -283
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +177 -120
- package/src/progress-indicator/progress-indicator.tokens.json +1 -1
- package/src/prompt-composer/prompt-composer.css +221 -102
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +161 -41
- package/src/section/section.tokens.json +7 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +118 -117
- package/src/select/select.tokens.json +1 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- 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 +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +341 -224
- package/src/stat-card/stat-card.tokens.json +3 -0
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +310 -165
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +337 -302
- package/src/tabs/tabs.tokens.json +8 -5
- package/src/tag/tag.css +79 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +145 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +132 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +31 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +72 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +108 -90
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +26 -26
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
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));
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
* in both schemes. It keeps its hairline, because a shadow is removed under
|
|
136
136
|
* forced colours 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,7 @@
|
|
|
274
269
|
row-gap: var(--slotted-card-header-gap, var(--slotted-space-2, 0.25rem));
|
|
275
270
|
}
|
|
276
271
|
|
|
277
|
-
[data-ui
|
|
272
|
+
[data-ui-card] > [data-part-header] > * {
|
|
278
273
|
grid-column: 1;
|
|
279
274
|
min-inline-size: 0;
|
|
280
275
|
}
|
|
@@ -282,7 +277,7 @@
|
|
|
282
277
|
/* The corner. It stays on the first row, so a title that wraps to two lines
|
|
283
278
|
does not drag the badge down with it, and it takes the last column whether
|
|
284
279
|
the header has two or three. */
|
|
285
|
-
[data-ui
|
|
280
|
+
[data-ui-card] > [data-part-header] > [data-part-actions] {
|
|
286
281
|
align-items: center;
|
|
287
282
|
display: flex;
|
|
288
283
|
flex-wrap: wrap;
|
|
@@ -307,15 +302,15 @@
|
|
|
307
302
|
* Carbon, Fluent and Cloudscape trail only because none of them keeps a
|
|
308
303
|
* corner in the header.
|
|
309
304
|
*/
|
|
310
|
-
[data-ui
|
|
305
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]) {
|
|
311
306
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
312
307
|
}
|
|
313
308
|
|
|
314
|
-
[data-ui
|
|
309
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]) > * {
|
|
315
310
|
grid-column: 2;
|
|
316
311
|
}
|
|
317
312
|
|
|
318
|
-
[data-ui
|
|
313
|
+
[data-ui-card] > [data-part-header] > [data-part-selection] {
|
|
319
314
|
/**
|
|
320
315
|
* On the title's first line, not in the middle of its block (C1, the rule
|
|
321
316
|
* R5 gives every mark beside a title): the slot is one line of the title's
|
|
@@ -359,7 +354,7 @@
|
|
|
359
354
|
* is the card: the surface is the `<label>`, so the hit area is the whole
|
|
360
355
|
* card, which is the correction the token foundation asks a family to make.
|
|
361
356
|
*/
|
|
362
|
-
[data-ui
|
|
357
|
+
[data-ui-card] > [data-part-header] > [data-part-selection] > :is(input, button) {
|
|
363
358
|
block-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
|
|
364
359
|
inline-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
|
|
365
360
|
margin: 0;
|
|
@@ -367,12 +362,12 @@
|
|
|
367
362
|
|
|
368
363
|
/* Cards stretched to a common height in a grid keep their footers on one
|
|
369
364
|
line, because the body takes the leftover. */
|
|
370
|
-
[data-ui
|
|
365
|
+
[data-ui-card] > [data-part-body] {
|
|
371
366
|
flex: 1 1 auto;
|
|
372
367
|
min-block-size: 0;
|
|
373
368
|
}
|
|
374
369
|
|
|
375
|
-
[data-ui
|
|
370
|
+
[data-ui-card] > [data-part-footer] {
|
|
376
371
|
align-items: center;
|
|
377
372
|
display: flex;
|
|
378
373
|
flex-wrap: wrap;
|
|
@@ -388,21 +383,21 @@
|
|
|
388
383
|
* region's own, and `inset` on the rule lines it up with the text instead.
|
|
389
384
|
* The regions on either side keep the distance they already had.
|
|
390
385
|
*/
|
|
391
|
-
[data-ui
|
|
386
|
+
[data-ui-card] > [data-ui-divider] {
|
|
392
387
|
flex-shrink: 0;
|
|
393
388
|
}
|
|
394
389
|
|
|
395
|
-
[data-ui
|
|
390
|
+
[data-ui-card][data-orientation='horizontal'] > [data-ui-divider] {
|
|
396
391
|
grid-column: 2;
|
|
397
392
|
}
|
|
398
393
|
|
|
399
|
-
[data-ui
|
|
394
|
+
[data-ui-card] > [data-part-media] {
|
|
400
395
|
display: block;
|
|
401
396
|
min-inline-size: 0;
|
|
402
397
|
overflow: hidden;
|
|
403
398
|
}
|
|
404
399
|
|
|
405
|
-
[data-ui
|
|
400
|
+
[data-ui-card] > [data-part-media] > :is(img, video, canvas, picture, svg) {
|
|
406
401
|
block-size: 100%;
|
|
407
402
|
display: block;
|
|
408
403
|
inline-size: 100%;
|
|
@@ -411,12 +406,12 @@
|
|
|
411
406
|
|
|
412
407
|
/* The media rounds the corners it touches and no others. The radius is the
|
|
413
408
|
card's own, less the edge it sits inside. */
|
|
414
|
-
[data-ui
|
|
409
|
+
[data-ui-card] > [data-part-media]:first-child {
|
|
415
410
|
border-start-end-radius: var(--_card-radius);
|
|
416
411
|
border-start-start-radius: var(--_card-radius);
|
|
417
412
|
}
|
|
418
413
|
|
|
419
|
-
[data-ui
|
|
414
|
+
[data-ui-card] > [data-part-media]:last-child {
|
|
420
415
|
border-end-end-radius: var(--_card-radius);
|
|
421
416
|
border-end-start-radius: var(--_card-radius);
|
|
422
417
|
}
|
|
@@ -427,7 +422,7 @@
|
|
|
427
422
|
* three of the second. The fourth row is empty until the card reflows, and
|
|
428
423
|
* an empty row costs nothing because the rhythm is padding, not a gap.
|
|
429
424
|
*/
|
|
430
|
-
[data-ui
|
|
425
|
+
[data-ui-card][data-orientation='horizontal'] {
|
|
431
426
|
container-name: slotted-card;
|
|
432
427
|
container-type: inline-size;
|
|
433
428
|
display: grid;
|
|
@@ -443,7 +438,7 @@
|
|
|
443
438
|
grid-template-rows: repeat(4, auto);
|
|
444
439
|
}
|
|
445
440
|
|
|
446
|
-
[data-ui
|
|
441
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-media] {
|
|
447
442
|
border-end-end-radius: 0;
|
|
448
443
|
border-end-start-radius: var(--_card-radius);
|
|
449
444
|
border-start-end-radius: 0;
|
|
@@ -451,15 +446,15 @@
|
|
|
451
446
|
grid-area: 1 / 1 / -1 / 2;
|
|
452
447
|
}
|
|
453
448
|
|
|
454
|
-
[data-ui
|
|
449
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-header] {
|
|
455
450
|
grid-area: 1 / 2;
|
|
456
451
|
}
|
|
457
452
|
|
|
458
|
-
[data-ui
|
|
453
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-body] {
|
|
459
454
|
grid-area: 2 / 2;
|
|
460
455
|
}
|
|
461
456
|
|
|
462
|
-
[data-ui
|
|
457
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
|
|
463
458
|
grid-area: 3 / 2;
|
|
464
459
|
}
|
|
465
460
|
|
|
@@ -470,21 +465,21 @@
|
|
|
470
465
|
* a literal because CSS forbids a custom property in a container condition.
|
|
471
466
|
*/
|
|
472
467
|
@container slotted-card (max-inline-size: 24rem) {
|
|
473
|
-
[data-ui
|
|
468
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-media] {
|
|
474
469
|
border-end-start-radius: 0;
|
|
475
470
|
border-start-end-radius: var(--_card-radius);
|
|
476
471
|
grid-area: 1 / 1 / 2 / -1;
|
|
477
472
|
}
|
|
478
473
|
|
|
479
|
-
[data-ui
|
|
474
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-header] {
|
|
480
475
|
grid-area: 2 / 1 / 3 / -1;
|
|
481
476
|
}
|
|
482
477
|
|
|
483
|
-
[data-ui
|
|
478
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-body] {
|
|
484
479
|
grid-area: 3 / 1 / 4 / -1;
|
|
485
480
|
}
|
|
486
481
|
|
|
487
|
-
[data-ui
|
|
482
|
+
[data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
|
|
488
483
|
grid-area: 4 / 1 / 5 / -1;
|
|
489
484
|
}
|
|
490
485
|
}
|
|
@@ -495,7 +490,7 @@
|
|
|
495
490
|
* Enter, the context menu and middle-click are the platform's, and the name
|
|
496
491
|
* is the title rather than every string in the card.
|
|
497
492
|
*/
|
|
498
|
-
[data-ui
|
|
493
|
+
[data-ui-card] [data-part-link]::after {
|
|
499
494
|
content: '';
|
|
500
495
|
inset: 0;
|
|
501
496
|
position: absolute;
|
|
@@ -508,8 +503,8 @@
|
|
|
508
503
|
* the same hex, so a selected card and a focused card were the same image.
|
|
509
504
|
* They now differ in colour, in width and in position.
|
|
510
505
|
*/
|
|
511
|
-
[data-ui
|
|
512
|
-
:is([data-part
|
|
506
|
+
[data-ui-card]:has(
|
|
507
|
+
:is([data-part-link], [data-part-selection] :is(input, button)):focus-visible
|
|
513
508
|
) {
|
|
514
509
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
515
510
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
@@ -525,10 +520,8 @@
|
|
|
525
520
|
* surface. Carbon and Fluent avoid the pair by hiding the control outright,
|
|
526
521
|
* which is not open here — the control is meant to be seen.
|
|
527
522
|
*/
|
|
528
|
-
[data-ui
|
|
529
|
-
[data-ui
|
|
530
|
-
[data-part='selection']
|
|
531
|
-
:is(input, button):focus-visible {
|
|
523
|
+
[data-ui-card]:has([data-part-link]) [data-part-link]:focus-visible,
|
|
524
|
+
[data-ui-card]:has([data-part-selection]) [data-part-selection] :is(input, button):focus-visible {
|
|
532
525
|
outline: none;
|
|
533
526
|
}
|
|
534
527
|
|
|
@@ -550,7 +543,7 @@
|
|
|
550
543
|
* accent's hover and active tints, as a selected row's does, and the edge
|
|
551
544
|
* holds, because it is already saying the stronger thing.
|
|
552
545
|
*/
|
|
553
|
-
[data-ui
|
|
546
|
+
[data-ui-card][data-selected] {
|
|
554
547
|
--_card-surface-rest: var(
|
|
555
548
|
--slotted-card-background-selected,
|
|
556
549
|
var(--slotted-tone-accent-surface, Canvas)
|
|
@@ -583,7 +576,7 @@
|
|
|
583
576
|
* mute in every case, and the elevation drops to nothing — a card that cannot
|
|
584
577
|
* be used does not float above the page.
|
|
585
578
|
*/
|
|
586
|
-
[data-ui
|
|
579
|
+
[data-ui-card][data-disabled] {
|
|
587
580
|
--_card-surface: var(--_card-surface-disabled);
|
|
588
581
|
--_card-edge: var(
|
|
589
582
|
--slotted-card-border-color-disabled,
|
|
@@ -596,7 +589,7 @@
|
|
|
596
589
|
|
|
597
590
|
/* The card withdraws the hit area it added. Disabling the control itself is
|
|
598
591
|
the consumer's, because only the control can refuse an interaction. */
|
|
599
|
-
[data-ui
|
|
592
|
+
[data-ui-card][data-disabled] [data-part-link]::after {
|
|
600
593
|
display: none;
|
|
601
594
|
}
|
|
602
595
|
}
|