@slotted/styles 0.1.0-beta.34 → 0.1.0-beta.36
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 +5 -1
- package/src/accordion/accordion.css +20 -2
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/avatar/avatar.css +1 -1
- package/src/avatar/avatar.tokens.json +1 -0
- package/src/badge/badge.css +1 -1
- package/src/badge/badge.tokens.json +1 -0
- package/src/button/button.css +247 -4
- package/src/button/button.tokens.json +8 -0
- package/src/calendar/calendar.css +131 -0
- package/src/calendar/calendar.tokens.json +10 -0
- package/src/card/card.css +63 -3
- package/src/cascader/cascader.css +13 -0
- package/src/chart/chart.css +3 -3
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +47 -0
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/collapsible/collapsible.css +174 -5
- package/src/collapsible/collapsible.tokens.json +4 -0
- package/src/combobox/combobox.css +13 -0
- package/src/command-palette/command-palette.css +60 -1
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/dashboard-grid/dashboard-grid.css +29 -9
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +44 -5
- package/src/data-list/data-list.css +17 -11
- package/src/description-list/description-list.css +15 -1
- package/src/entity-picker/entity-picker.css +70 -1
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/field-group/field-group.css +17 -7
- package/src/filter-bar/filter-bar.css +24 -0
- package/src/floating-panel/floating-panel.css +123 -0
- package/src/floating-panel/floating-panel.tokens.json +30 -0
- package/src/inline-message/inline-message.css +1 -1
- package/src/inline-message/inline-message.tokens.json +1 -0
- package/src/kbd/kbd.css +1 -1
- package/src/kbd/kbd.tokens.json +1 -0
- package/src/list/list.css +32 -1
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +102 -7
- package/src/list-item/list-item.tokens.json +3 -0
- package/src/listbox/listbox.css +50 -2
- package/src/listbox/listbox.tokens.json +6 -0
- package/src/message/message.css +20 -0
- package/src/message/message.tokens.json +1 -0
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +13 -0
- package/src/page/page.css +58 -4
- package/src/page/page.tokens.json +7 -0
- package/src/prompt-composer/prompt-composer.css +18 -7
- package/src/rating/rating.css +1 -1
- package/src/rating/rating.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -0
- package/src/section/section.css +61 -4
- package/src/section/section.tokens.json +6 -0
- package/src/segmented-control/segmented-control.css +11 -0
- package/src/select/select.css +13 -0
- package/src/side-navigation/side-navigation.css +3 -3
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/slider/slider.css +7 -1
- package/src/slider/slider.tokens.json +1 -0
- package/src/stat-card/stat-card.css +5 -0
- package/src/status-indicator/status-indicator.css +3 -2
- package/src/switch/switch.css +49 -25
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +166 -12
- package/src/table/table.tokens.json +5 -0
- package/src/tag/tag.css +4 -1
- package/src/tag/tag.tokens.json +1 -0
- package/src/toolbar/toolbar.css +16 -2
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +30 -0
- package/src/top-navigation/top-navigation.css +1 -1
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/typography/typography.css +25 -0
- package/src/typography/typography.tokens.json +1 -0
package/src/table/table.css
CHANGED
|
@@ -242,6 +242,26 @@
|
|
|
242
242
|
text-align: start;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
/* The name without the picture: a table under a heading that already names
|
|
246
|
+
it. The caption keeps naming the table and takes no box, so the space
|
|
247
|
+
above the header row is the space under the last row. */
|
|
248
|
+
/* Inside a frame the caption is the top of the same band as the header,
|
|
249
|
+
not a band of the table's surface above it. */
|
|
250
|
+
[data-ui-table][data-variant='framed'] [data-part-caption] {
|
|
251
|
+
background-color: var(--slotted-table-caption-surface, var(--_head-surface));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
[data-ui-table] [data-part-caption][data-visually-hidden] {
|
|
255
|
+
block-size: 1px;
|
|
256
|
+
clip-path: inset(50%);
|
|
257
|
+
inline-size: 1px;
|
|
258
|
+
margin: -1px;
|
|
259
|
+
overflow: hidden;
|
|
260
|
+
padding: 0;
|
|
261
|
+
position: absolute;
|
|
262
|
+
white-space: nowrap;
|
|
263
|
+
}
|
|
264
|
+
|
|
245
265
|
/**
|
|
246
266
|
* ── The header ─────────────────────────────────────────────────────────
|
|
247
267
|
*
|
|
@@ -297,6 +317,21 @@
|
|
|
297
317
|
background-color: var(--_row-ground);
|
|
298
318
|
}
|
|
299
319
|
|
|
320
|
+
/**
|
|
321
|
+
* In the body the cells paint the row's ground, not the row. A pinned cell
|
|
322
|
+
* paints that ground over its own surface, and above a row that painted it
|
|
323
|
+
* too a translucent ground showed twice on the pinned column: a hover of 6%
|
|
324
|
+
* read as 12% there. Each cell is one layer, pinned or not. `:where()` keeps
|
|
325
|
+
* the rule under every other ground a cell states.
|
|
326
|
+
*/
|
|
327
|
+
[data-ui-table] [data-part-body] > [data-part-row] {
|
|
328
|
+
background-color: transparent;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
[data-ui-table] :where([data-part-body] > [data-part-row] > *) {
|
|
332
|
+
background-color: var(--_row-ground);
|
|
333
|
+
}
|
|
334
|
+
|
|
300
335
|
/**
|
|
301
336
|
* ── Where a cell's content sits in its row ─────────────────────────────
|
|
302
337
|
*
|
|
@@ -327,6 +362,12 @@
|
|
|
327
362
|
|
|
328
363
|
[data-ui-table] [data-part-cell],
|
|
329
364
|
[data-ui-table] [data-part-row-header] {
|
|
365
|
+
/* Published on the cell and not on the root, where the private values
|
|
366
|
+
read these two names: content drawn inside a cell reads the padding in
|
|
367
|
+
use, and an override set by the application still wins. */
|
|
368
|
+
--slotted-table-cell-padding-block: var(--_pad-block);
|
|
369
|
+
--slotted-table-cell-padding-inline: var(--_pad-inline);
|
|
370
|
+
|
|
330
371
|
padding-block: var(--_pad-block);
|
|
331
372
|
padding-inline: var(--_pad-inline);
|
|
332
373
|
text-align: start;
|
|
@@ -576,6 +617,33 @@
|
|
|
576
617
|
min-inline-size: 0;
|
|
577
618
|
}
|
|
578
619
|
|
|
620
|
+
/*
|
|
621
|
+
* A table wider than its scroller kept the group's total at the end of the
|
|
622
|
+
* full table width, off screen until the reader scrolled all the way across,
|
|
623
|
+
* and the name left the view on the way. The band's ground and rule still
|
|
624
|
+
* span the table; its content is the scroller's width, pinned to its start,
|
|
625
|
+
* so the name and the total stay in view at every scroll position. The
|
|
626
|
+
* scroller is a size container only when it holds a group row.
|
|
627
|
+
*/
|
|
628
|
+
[data-ui-table] [data-part-scroll]:has([data-part-group-row]) {
|
|
629
|
+
container-type: inline-size;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
[data-ui-table]
|
|
633
|
+
[data-part-scroll]:has([data-part-group-row])
|
|
634
|
+
[data-part-group-row]
|
|
635
|
+
> [data-part-group-header] {
|
|
636
|
+
padding-inline: 0;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
[data-ui-table] [data-part-scroll]:has([data-part-group-row]) [data-part-group-content] {
|
|
640
|
+
box-sizing: border-box;
|
|
641
|
+
inline-size: min(100cqi, 100%);
|
|
642
|
+
inset-inline-start: 0;
|
|
643
|
+
padding-inline: var(--_pad-inline);
|
|
644
|
+
position: sticky;
|
|
645
|
+
}
|
|
646
|
+
|
|
579
647
|
[data-ui-table] [data-part-group-end] {
|
|
580
648
|
font-variant-numeric: tabular-nums;
|
|
581
649
|
text-align: end;
|
|
@@ -699,20 +767,19 @@
|
|
|
699
767
|
* top, over the first rows. A `page` table inside a scrolling box of the
|
|
700
768
|
* consumer's own sets the offset on that box, `0` for its top edge.
|
|
701
769
|
*/
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
770
|
+
/* The `thead` is pinned as one element, not each cell: a backdrop filter
|
|
771
|
+
samples only inside the box that carries it, so a blur set per cell
|
|
772
|
+
restarted at every column boundary. Pinned as one, the head is the box a
|
|
773
|
+
theme blurs once (`--slotted-table-header-backdrop-filter`) and the
|
|
774
|
+
select-all moves with the columns beside it. */
|
|
775
|
+
[data-ui-table][data-sticky-header] [data-part-head] {
|
|
776
|
+
backdrop-filter: var(--slotted-table-header-backdrop-filter, none);
|
|
707
777
|
inset-block-start: 0;
|
|
708
778
|
position: sticky;
|
|
709
779
|
z-index: calc(var(--slotted-z-index-sticky, 100) + 1);
|
|
710
780
|
}
|
|
711
781
|
|
|
712
|
-
[data-ui-table][data-sticky-to='page'][data-sticky-header] [data-part-
|
|
713
|
-
[data-ui-table][data-sticky-to='page'][data-sticky-header]
|
|
714
|
-
[data-part-head]
|
|
715
|
-
[data-part-selection] {
|
|
782
|
+
[data-ui-table][data-sticky-to='page'][data-sticky-header] [data-part-head] {
|
|
716
783
|
inset-block-start: var(--slotted-table-sticky-offset, 0);
|
|
717
784
|
}
|
|
718
785
|
|
|
@@ -764,7 +831,7 @@
|
|
|
764
831
|
var(--_pinned-ground, var(--_row-ground)),
|
|
765
832
|
var(--_pinned-ground, var(--_row-ground))
|
|
766
833
|
),
|
|
767
|
-
var(--slotted-table-sticky-surface, var(--slotted-surface, Canvas));
|
|
834
|
+
var(--slotted-table-sticky-surface, var(--slotted-ground, var(--slotted-surface, Canvas)));
|
|
768
835
|
}
|
|
769
836
|
|
|
770
837
|
[data-ui-table] [data-sticky='start'] {
|
|
@@ -1128,6 +1195,94 @@
|
|
|
1128
1195
|
display: contents;
|
|
1129
1196
|
}
|
|
1130
1197
|
|
|
1198
|
+
/**
|
|
1199
|
+
* ── Rows that fold their children ──────────────────────────────────────
|
|
1200
|
+
*
|
|
1201
|
+
* A row with a `level` is a node of a bounded hierarchy: accounts, folders,
|
|
1202
|
+
* cost centres. The first cell that is not the selection carries the
|
|
1203
|
+
* indent, and the indent and the guide are the `tree` family's: one step is
|
|
1204
|
+
* half the expander plus a step of the space scale, so the line one level up
|
|
1205
|
+
* sits on the expander's center and the row's own expander starts a fixed
|
|
1206
|
+
* distance past it. A row without an expander keeps the expander's box as
|
|
1207
|
+
* space, so a leaf's text lines up with a sibling's that has one.
|
|
1208
|
+
*
|
|
1209
|
+
* The guide is one box per row with a line per ancestor level, through the
|
|
1210
|
+
* whole row and over the rule above it, so it stays continuous across rows
|
|
1211
|
+
* of any height. It turns no elbow at a last child, which is the rule the
|
|
1212
|
+
* `tree` family settled: a chain of only children drew a staircase of short
|
|
1213
|
+
* segments with a gap under each.
|
|
1214
|
+
*/
|
|
1215
|
+
[data-ui-table] [data-part-row][data-level] {
|
|
1216
|
+
--_tree-step: var(
|
|
1217
|
+
--slotted-table-tree-indent,
|
|
1218
|
+
calc(var(--slotted-target-min, 24px) / 2 + var(--slotted-space-4, 0.5rem))
|
|
1219
|
+
);
|
|
1220
|
+
--_guide: var(
|
|
1221
|
+
--slotted-table-guide-color,
|
|
1222
|
+
color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle))
|
|
1223
|
+
);
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
[data-ui-table] [data-part-row][data-level] > :nth-child(1 of :not([data-part-selection])) {
|
|
1227
|
+
inline-size: auto;
|
|
1228
|
+
padding-inline-end: var(--_pad-inline);
|
|
1229
|
+
padding-inline-start: calc(
|
|
1230
|
+
var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0)
|
|
1231
|
+
);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
[data-ui-table]
|
|
1235
|
+
[data-part-row][data-level]
|
|
1236
|
+
> :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-expander])) {
|
|
1237
|
+
padding-inline-start: calc(
|
|
1238
|
+
var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0) +
|
|
1239
|
+
var(--slotted-target-min, 24px) + var(--_gap)
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
[data-ui-table]
|
|
1244
|
+
[data-part-row][data-level]
|
|
1245
|
+
> :nth-child(1 of :not([data-part-selection])):not([data-sticky]) {
|
|
1246
|
+
position: relative;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
[data-ui-table]
|
|
1250
|
+
[data-part-row][data-level]
|
|
1251
|
+
> :nth-child(1 of :not([data-part-selection]))::before {
|
|
1252
|
+
background-image: repeating-linear-gradient(
|
|
1253
|
+
to right,
|
|
1254
|
+
var(--_guide) 0 var(--_rule-width),
|
|
1255
|
+
transparent var(--_rule-width) var(--_tree-step)
|
|
1256
|
+
);
|
|
1257
|
+
content: '';
|
|
1258
|
+
inline-size: calc(var(--slotted-table-depth, 0) * var(--_tree-step));
|
|
1259
|
+
inset-block: calc(-1 * var(--_rule-width)) 0;
|
|
1260
|
+
inset-inline-start: calc(var(--_pad-inline) + var(--slotted-target-min, 24px) / 2);
|
|
1261
|
+
pointer-events: none;
|
|
1262
|
+
position: absolute;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
[data-ui-table]
|
|
1266
|
+
[data-part-row][data-level]
|
|
1267
|
+
> :nth-child(1 of :not([data-part-selection])):dir(rtl)::before {
|
|
1268
|
+
background-image: repeating-linear-gradient(
|
|
1269
|
+
to left,
|
|
1270
|
+
var(--_guide) 0 var(--_rule-width),
|
|
1271
|
+
transparent var(--_rule-width) var(--_tree-step)
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
[data-ui-table] [data-part-row][data-level] > * > [data-part-expander] {
|
|
1276
|
+
margin-inline-end: var(--_gap);
|
|
1277
|
+
vertical-align: top;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
[data-ui-table][data-guides='false']
|
|
1281
|
+
[data-part-row][data-level]
|
|
1282
|
+
> :nth-child(1 of :not([data-part-selection]))::before {
|
|
1283
|
+
background-image: none;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1131
1286
|
/**
|
|
1132
1287
|
* ── The expander ───────────────────────────────────────────────────────
|
|
1133
1288
|
*
|
|
@@ -1654,8 +1809,7 @@
|
|
|
1654
1809
|
overflow: visible;
|
|
1655
1810
|
}
|
|
1656
1811
|
|
|
1657
|
-
[data-ui-table][data-sticky-header] [data-part-
|
|
1658
|
-
[data-ui-table][data-sticky-header] [data-part-head] [data-part-selection],
|
|
1812
|
+
[data-ui-table][data-sticky-header] [data-part-head],
|
|
1659
1813
|
[data-ui-table][data-sticky-footer] [data-part-summary] > [data-part-row] > *,
|
|
1660
1814
|
[data-ui-table] [data-sticky] {
|
|
1661
1815
|
position: static;
|
|
@@ -26,12 +26,14 @@
|
|
|
26
26
|
"--slotted-radius-sm",
|
|
27
27
|
"--slotted-shadow-xs",
|
|
28
28
|
"--slotted-space-2",
|
|
29
|
+
"--slotted-space-4",
|
|
29
30
|
"--slotted-space-5",
|
|
30
31
|
"--slotted-space-9",
|
|
31
32
|
"--slotted-surface",
|
|
32
33
|
"--slotted-table-border-color",
|
|
33
34
|
"--slotted-table-border-color-strong",
|
|
34
35
|
"--slotted-table-border-width",
|
|
36
|
+
"--slotted-table-caption-surface",
|
|
35
37
|
"--slotted-table-cell-padding-block",
|
|
36
38
|
"--slotted-table-cell-padding-inline",
|
|
37
39
|
"--slotted-table-color",
|
|
@@ -45,6 +47,8 @@
|
|
|
45
47
|
"--slotted-table-group-color",
|
|
46
48
|
"--slotted-table-group-sticky-offset",
|
|
47
49
|
"--slotted-table-group-surface",
|
|
50
|
+
"--slotted-table-guide-color",
|
|
51
|
+
"--slotted-table-header-backdrop-filter",
|
|
48
52
|
"--slotted-table-header-surface",
|
|
49
53
|
"--slotted-table-header-surface-hover",
|
|
50
54
|
"--slotted-table-icon-size",
|
|
@@ -63,6 +67,7 @@
|
|
|
63
67
|
"--slotted-table-sticky-offset-end",
|
|
64
68
|
"--slotted-table-sticky-surface",
|
|
65
69
|
"--slotted-table-surface",
|
|
70
|
+
"--slotted-table-tree-indent",
|
|
66
71
|
"--slotted-target-comfortable",
|
|
67
72
|
"--slotted-target-min",
|
|
68
73
|
"--slotted-text",
|
package/src/tag/tag.css
CHANGED
|
@@ -132,6 +132,9 @@
|
|
|
132
132
|
*/
|
|
133
133
|
max-inline-size: 100%;
|
|
134
134
|
min-block-size: var(--_block-size);
|
|
135
|
+
/* A flex item keeps min-inline-size: auto and never shrinks below its
|
|
136
|
+
text, so the label's ellipsis would never apply in a row. */
|
|
137
|
+
min-inline-size: 0;
|
|
135
138
|
/* Written inside a sentence, a tag sits on the text's center. */
|
|
136
139
|
vertical-align: middle;
|
|
137
140
|
white-space: nowrap;
|
|
@@ -386,7 +389,7 @@
|
|
|
386
389
|
*/
|
|
387
390
|
margin-block: -0.3em;
|
|
388
391
|
padding-block: 0.3em;
|
|
389
|
-
text-box: trim-both cap alphabetic;
|
|
392
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
390
393
|
}
|
|
391
394
|
}
|
|
392
395
|
|
package/src/tag/tag.tokens.json
CHANGED
package/src/toolbar/toolbar.css
CHANGED
|
@@ -100,10 +100,24 @@
|
|
|
100
100
|
calc(var(--slotted-focus-ring-offset, 2px) + var(--slotted-focus-ring-width, 2px))
|
|
101
101
|
);
|
|
102
102
|
|
|
103
|
+
--_frame-edge: var(--slotted-toolbar-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
104
|
+
|
|
103
105
|
background-color: var(--slotted-toolbar-background, var(--slotted-surface-raised));
|
|
104
|
-
border: var(--slotted-border-width-thin, 1px) solid
|
|
105
|
-
var(--slotted-toolbar-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
106
106
|
border-radius: var(--slotted-radius-md, 6px);
|
|
107
|
+
box-shadow: var(--slotted-toolbar-shadow, none);
|
|
108
|
+
/* The containing block of the edge. */
|
|
109
|
+
position: relative;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* The edge, drawn as a card's is (collapsible records why). */
|
|
113
|
+
[data-ui-toolbar][data-variant='outline']::before {
|
|
114
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--_frame-edge);
|
|
115
|
+
border-radius: inherit;
|
|
116
|
+
content: '';
|
|
117
|
+
inset: 0;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
position: absolute;
|
|
120
|
+
z-index: 1;
|
|
107
121
|
}
|
|
108
122
|
|
|
109
123
|
/* ── Overflow ─────────────────────────────────────────────────────────── */
|
package/src/tooltip/tooltip.css
CHANGED
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
*/
|
|
59
59
|
--_shadow: var(--slotted-tooltip-shadow, var(--slotted-shadow-xs));
|
|
60
60
|
--_arrow-size: var(--slotted-tooltip-arrow-size, 0.5rem);
|
|
61
|
+
/* How far the clipped arrow reaches over the content along each of its edges. */
|
|
62
|
+
--_arrow-overlap: 0.5px;
|
|
61
63
|
/* The point, softened to the same degree the surface's own corners are.
|
|
62
64
|
A 90-degree tip beside a rounded panel reads as a different object. */
|
|
63
65
|
--_arrow-tip-radius: var(--slotted-tooltip-arrow-tip-radius, var(--slotted-radius-xs, 2px));
|
|
@@ -269,6 +271,8 @@
|
|
|
269
271
|
--_text: var(--slotted-tooltip-text-raised, var(--slotted-text, #0f172a));
|
|
270
272
|
--_border-color: var(--slotted-tooltip-border-color, var(--slotted-border-subtle, #e2e8f0));
|
|
271
273
|
--_border-width: var(--slotted-border-width-thin, 1px);
|
|
274
|
+
/* Along a rotated edge, 1.5 border widths reach one border width deep. */
|
|
275
|
+
--_arrow-overlap: calc(var(--_border-width) * 1.5);
|
|
272
276
|
}
|
|
273
277
|
|
|
274
278
|
[data-ui-tooltip] > [data-part-content] {
|
|
@@ -345,6 +349,12 @@
|
|
|
345
349
|
*
|
|
346
350
|
* `arrowPadding` keeps it clear of the corners, where the content's radius
|
|
347
351
|
* would leave the base uncovered.
|
|
352
|
+
*
|
|
353
|
+
* ── Why only its outer half is drawn ─────────────────────────────────
|
|
354
|
+
*
|
|
355
|
+
* While both parts fade, the half that lies over the content composites
|
|
356
|
+
* twice and the whole diamond shows through it. The square is clipped to its
|
|
357
|
+
* outer half, with the overlap that covers the content's edge under the base.
|
|
348
358
|
*/
|
|
349
359
|
[data-ui-tooltip] > [data-part-arrow] {
|
|
350
360
|
position: absolute;
|
|
@@ -363,6 +373,11 @@
|
|
|
363
373
|
border-right-width: var(--_border-width);
|
|
364
374
|
border-bottom-width: var(--_border-width);
|
|
365
375
|
border-bottom-right-radius: var(--_arrow-tip-radius);
|
|
376
|
+
clip-path: polygon(
|
|
377
|
+
100% 100%,
|
|
378
|
+
100% calc(-1 * var(--_arrow-overlap)),
|
|
379
|
+
calc(-1 * var(--_arrow-overlap)) 100%
|
|
380
|
+
);
|
|
366
381
|
}
|
|
367
382
|
|
|
368
383
|
[data-ui-tooltip][data-side='bottom'] > [data-part-arrow] {
|
|
@@ -372,6 +387,11 @@
|
|
|
372
387
|
border-top-width: var(--_border-width);
|
|
373
388
|
border-left-width: var(--_border-width);
|
|
374
389
|
border-top-left-radius: var(--_arrow-tip-radius);
|
|
390
|
+
clip-path: polygon(
|
|
391
|
+
0 0,
|
|
392
|
+
calc(100% + var(--_arrow-overlap)) 0,
|
|
393
|
+
0 calc(100% + var(--_arrow-overlap))
|
|
394
|
+
);
|
|
375
395
|
}
|
|
376
396
|
|
|
377
397
|
[data-ui-tooltip][data-side='left'] > [data-part-arrow] {
|
|
@@ -381,6 +401,11 @@
|
|
|
381
401
|
border-top-width: var(--_border-width);
|
|
382
402
|
border-right-width: var(--_border-width);
|
|
383
403
|
border-top-right-radius: var(--_arrow-tip-radius);
|
|
404
|
+
clip-path: polygon(
|
|
405
|
+
100% 0,
|
|
406
|
+
100% calc(100% + var(--_arrow-overlap)),
|
|
407
|
+
calc(-1 * var(--_arrow-overlap)) 0
|
|
408
|
+
);
|
|
384
409
|
}
|
|
385
410
|
|
|
386
411
|
[data-ui-tooltip][data-side='right'] > [data-part-arrow] {
|
|
@@ -390,5 +415,10 @@
|
|
|
390
415
|
border-bottom-width: var(--_border-width);
|
|
391
416
|
border-left-width: var(--_border-width);
|
|
392
417
|
border-bottom-left-radius: var(--_arrow-tip-radius);
|
|
418
|
+
clip-path: polygon(
|
|
419
|
+
0 100%,
|
|
420
|
+
0 calc(-1 * var(--_arrow-overlap)),
|
|
421
|
+
calc(100% + var(--_arrow-overlap)) 100%
|
|
422
|
+
);
|
|
393
423
|
}
|
|
394
424
|
}
|
|
@@ -747,7 +747,7 @@
|
|
|
747
747
|
/** What is centerd is the ink rather than the font's metrics, as `badge` and `avatar` do it. */
|
|
748
748
|
@supports (text-box: trim-both cap alphabetic) {
|
|
749
749
|
[data-ui-top-navigation] [data-part-count] {
|
|
750
|
-
text-box: trim-both cap alphabetic;
|
|
750
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
|
|
@@ -212,4 +212,29 @@
|
|
|
212
212
|
min-inline-size: 0;
|
|
213
213
|
overflow: hidden;
|
|
214
214
|
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* `textBox`: the half-leading taken off the start, the end or both edges of
|
|
218
|
+
* the box. `text-box-trim` does not inherit, so it is set on the root, and
|
|
219
|
+
* the edge is the instance's or the theme's (`--slotted-text-box-edge`), the
|
|
220
|
+
* one every family that trims its own labels reads. A browser without the
|
|
221
|
+
* property draws the normal box.
|
|
222
|
+
*/
|
|
223
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
224
|
+
[data-ui-typography][data-text-box] {
|
|
225
|
+
text-box-edge: var(--_text-box-edge, var(--slotted-text-box-edge, cap alphabetic));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
[data-ui-typography][data-text-box='trim-start'] {
|
|
229
|
+
text-box-trim: trim-start;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[data-ui-typography][data-text-box='trim-end'] {
|
|
233
|
+
text-box-trim: trim-end;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
[data-ui-typography][data-text-box='trim-both'] {
|
|
237
|
+
text-box-trim: trim-both;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
215
240
|
}
|