@slotted/styles 0.1.0-beta.20 → 0.1.0-beta.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.20",
3
+ "version": "0.1.0-beta.22",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -73,6 +73,8 @@
73
73
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
74
74
  font-size: var(--_font-size);
75
75
  grid-template-columns: minmax(0, 1fr) auto;
76
+ /* In a flex row the item's basis is its content, not the whole row. */
77
+ flex-basis: content;
76
78
  inline-size: 100%;
77
79
  min-block-size: var(--_height);
78
80
  min-inline-size: 0;
@@ -397,6 +397,19 @@
397
397
  z-index: var(--slotted-z-index-popover, 1100);
398
398
  }
399
399
 
400
+ /* A theme that paints the chart's floating layers as a translucent material blurs the plot under them. */
401
+ [data-ui-chart] :is([data-part-menu], [data-part-help-content], [data-part-tooltip]) {
402
+ -webkit-backdrop-filter: var(--slotted-chart-overlay-backdrop-filter, none);
403
+ backdrop-filter: var(--slotted-chart-overlay-backdrop-filter, none);
404
+ }
405
+
406
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
407
+ [data-ui-chart] :is([data-part-menu], [data-part-help-content], [data-part-tooltip]) {
408
+ -webkit-backdrop-filter: none;
409
+ backdrop-filter: none;
410
+ }
411
+ }
412
+
400
413
  [data-ui-chart] [data-part-menu] {
401
414
  display: grid;
402
415
  min-inline-size: 11rem;
@@ -28,6 +28,7 @@
28
28
  "--slotted-chart-label-size",
29
29
  "--slotted-chart-line-width",
30
30
  "--slotted-chart-marker-size",
31
+ "--slotted-chart-overlay-backdrop-filter",
31
32
  "--slotted-chart-plot-block-size",
32
33
  "--slotted-chart-plot-block-size-lg",
33
34
  "--slotted-chart-plot-block-size-sm",
@@ -83,6 +83,8 @@
83
83
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
84
84
  font-size: var(--_font-size);
85
85
  gap: var(--slotted-space-1, 0.125rem);
86
+ /* In a flex row the item's basis is its content, not the whole row. */
87
+ flex-basis: content;
86
88
  inline-size: 100%;
87
89
  min-inline-size: 0;
88
90
  min-block-size: var(--_height);
@@ -101,6 +101,8 @@
101
101
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
102
102
  font-size: var(--_font-size);
103
103
  gap: var(--_gap);
104
+ /* In a flex row the item's basis is its content, not the whole row. */
105
+ flex-basis: content;
104
106
  inline-size: 100%;
105
107
  /* A control in a grid track narrower than its intrinsic width has to shrink. */
106
108
  min-inline-size: 0;
@@ -51,6 +51,8 @@
51
51
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
52
52
  font-size: var(--_font-size);
53
53
  gap: var(--_gap);
54
+ /* In a flex row the item's basis is its content, not the whole row. */
55
+ flex-basis: content;
54
56
  inline-size: 100%;
55
57
  min-block-size: var(--_height);
56
58
  min-inline-size: 0;
@@ -21,9 +21,11 @@
21
21
  */
22
22
  [data-ui-date-picker][data-part-root] {
23
23
  display: block;
24
+ /* In a flex row the item's basis is its content, not the whole row. */
25
+ flex-basis: content;
24
26
  /* The anchor the positioner measures is the control, and a block root
25
- takes the width the form gave it without `inline-size: 100%`, which in a
26
- flex row made the whole row this item's basis and clipped the date. */
27
+ lets the frame take the width the form gave it. */
28
+ inline-size: 100%;
27
29
  }
28
30
 
29
31
  /**
@@ -31,6 +31,8 @@
31
31
  */
32
32
  [data-ui-date-range-picker][data-part-root] {
33
33
  display: block;
34
+ /* In a flex row the item's basis is its content, not the whole row. */
35
+ flex-basis: content;
34
36
  /* The anchor the positioner measures is the control, and a block root
35
37
  lets the frame take the width the form gave it. */
36
38
  inline-size: 100%;
@@ -67,6 +67,8 @@
67
67
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
68
68
  font-size: var(--_font-size);
69
69
  gap: var(--_gap);
70
+ /* In a flex row the item's basis is its content, not the whole row. */
71
+ flex-basis: content;
70
72
  inline-size: 100%;
71
73
  min-block-size: var(--_height);
72
74
  min-inline-size: 0;
@@ -30,6 +30,8 @@
30
30
  */
31
31
  [data-ui-datetime-picker][data-part-root] {
32
32
  display: block;
33
+ /* In a flex row the item's basis is its content, not the whole row. */
34
+ flex-basis: content;
33
35
  /* The anchor the positioner measures is the control, and a block root lets
34
36
  the frame take the width the form gave it. */
35
37
  inline-size: 100%;
@@ -41,6 +41,8 @@
41
41
  */
42
42
  [data-ui-datetime-range-picker][data-part-root] {
43
43
  display: block;
44
+ /* In a flex row the item's basis is its content, not the whole row. */
45
+ flex-basis: content;
44
46
  /* The anchor the positioner measures is the control, and a block root
45
47
  lets the frame take the width the form gave it. */
46
48
  inline-size: 100%;
@@ -1288,6 +1288,16 @@
1288
1288
  padding-block: var(--_padding-block);
1289
1289
  padding-inline: var(--_row-padding-inline-start) var(--_row-padding-inline-end);
1290
1290
  background: var(--slotted-drawer-footer-surface, var(--slotted-surface-sunken, Canvas));
1291
+ /* The body scrolls under the footer; the panel's own filter blurs only what lies behind the panel. */
1292
+ -webkit-backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
1293
+ backdrop-filter: var(--slotted-drawer-footer-backdrop-filter, none);
1294
+ }
1295
+
1296
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
1297
+ [data-ui-drawer] > [data-part-panel] > [data-part-footer] {
1298
+ -webkit-backdrop-filter: none;
1299
+ backdrop-filter: none;
1300
+ }
1291
1301
  }
1292
1302
 
1293
1303
  /**
@@ -22,6 +22,7 @@
22
22
  "--slotted-drawer-extent-md",
23
23
  "--slotted-drawer-extent-sm",
24
24
  "--slotted-drawer-extent-xl",
25
+ "--slotted-drawer-footer-backdrop-filter",
25
26
  "--slotted-drawer-footer-surface",
26
27
  "--slotted-drawer-radius",
27
28
  "--slotted-drawer-radius-expanded",
@@ -61,6 +61,8 @@
61
61
 
62
62
  display: flex;
63
63
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
64
+ /* In a flex row the item's basis is its content, not the whole row. */
65
+ flex-basis: content;
64
66
  inline-size: 100%;
65
67
  min-inline-size: 0;
66
68
  }
@@ -126,6 +126,8 @@
126
126
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
127
127
  font-size: var(--_font-size);
128
128
  gap: var(--slotted-space-1, 0.125rem);
129
+ /* In a flex row the item's basis is its content, not the whole row. */
130
+ flex-basis: content;
129
131
  inline-size: 100%;
130
132
  min-block-size: var(--_height);
131
133
  min-inline-size: 0;
@@ -102,6 +102,8 @@
102
102
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
103
103
  font-size: var(--_font-size);
104
104
  gap: var(--_gap);
105
+ /* In a flex row the item's basis is its content, not the whole row. */
106
+ flex-basis: content;
105
107
  inline-size: 100%;
106
108
  /* A control in a grid track narrower than its intrinsic width has to shrink. */
107
109
  min-inline-size: 0;
package/src/page/page.css CHANGED
@@ -133,9 +133,7 @@
133
133
  min-inline-size: 0;
134
134
  padding-block: var(--_footer-padding-block);
135
135
  position: sticky;
136
- transition:
137
- translate var(--_duration) var(--_easing),
138
- opacity var(--_duration) var(--_easing);
136
+ transition: translate var(--_duration) var(--_easing);
139
137
  z-index: var(--slotted-z-index-sticky, 100);
140
138
  }
141
139
  [data-ui-page][data-scroll='self'] > [data-part-footer] {
@@ -143,14 +141,14 @@
143
141
  }
144
142
  [data-ui-page] > [data-part-footer][data-status='entering'],
145
143
  [data-ui-page] > [data-part-footer][data-status='exiting'] {
146
- opacity: 0;
147
144
  translate: 0 100%;
148
145
  }
149
146
 
150
147
  /**
151
148
  * A theme draws the footer as a material with a ground that has alpha and
152
- * `--slotted-page-footer-backdrop-filter`, `none` unless set. The footer's
153
- * own fade keeps the filter drawn: only an ancestor's opacity removes it.
149
+ * `--slotted-page-footer-backdrop-filter`, `none` unless set. The footer
150
+ * moves by its translate alone: Chromium draws no backdrop filter on an
151
+ * element whose opacity is below one.
154
152
  */
155
153
  [data-ui-page] > [data-part-footer] {
156
154
  -webkit-backdrop-filter: var(--slotted-page-footer-backdrop-filter, none);
@@ -125,9 +125,9 @@
125
125
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
126
126
  font-size: var(--_font-size);
127
127
  grid-template-columns: minmax(0, 1fr) auto;
128
- /* No `inline-size: 100%`: a block box fills its container on its own, and
129
- in a flex row a percentage is every item's basis — beside a date picker
130
- both claimed the whole row and the shrink clipped the date. */
128
+ /* In a flex row the item's basis is its content, not the whole row. */
129
+ flex-basis: content;
130
+ inline-size: 100%;
131
131
  /* A control in a grid track narrower than its intrinsic width would
132
132
  otherwise refuse to shrink and take the row's edge with it. */
133
133
  min-inline-size: 0;
package/src/tag/tag.css CHANGED
@@ -230,6 +230,8 @@
230
230
  * with nothing behind it. `soft` keeps its edge because in `high-contrast`
231
231
  * every tone surface collapses to the page's own white, and there it
232
232
  * converges with `outline` — which is what a high-contrast scheme is for.
233
+ * `dashed` is `outline` with the edge drawn in dashes; a selected tag fills,
234
+ * and its edge is solid again.
233
235
  */
234
236
 
235
237
  [data-ui-tag][data-part-root][data-variant='solid'] {
@@ -244,12 +246,17 @@
244
246
  color: var(--_text, ButtonText);
245
247
  }
246
248
 
247
- [data-ui-tag][data-part-root][data-variant='outline'] {
249
+ [data-ui-tag][data-part-root][data-variant='outline'],
250
+ [data-ui-tag][data-part-root][data-variant='dashed'] {
248
251
  background-color: transparent;
249
252
  border-color: var(--_border, ButtonBorder);
250
253
  color: var(--_text, ButtonText);
251
254
  }
252
255
 
256
+ [data-ui-tag][data-part-root][data-variant='dashed']:not([data-selected]) {
257
+ border-style: dashed;
258
+ }
259
+
253
260
  /* ── Size ─────────────────────────────────────────────────────────────── */
254
261
 
255
262
  [data-ui-tag][data-part-root][data-size='sm'] {
@@ -594,11 +601,15 @@
594
601
  }
595
602
 
596
603
  [data-ui-tag][data-part-root][data-variant='outline']:not([data-disabled]):not([data-selected])
604
+ :is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled),
605
+ [data-ui-tag][data-part-root][data-variant='dashed']:not([data-disabled]):not([data-selected])
597
606
  :is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled) {
598
607
  background-color: var(--_subtle-hover, ButtonFace);
599
608
  }
600
609
 
601
610
  [data-ui-tag][data-part-root][data-variant='outline']:not([data-disabled]):not([data-selected])
611
+ :is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled),
612
+ [data-ui-tag][data-part-root][data-variant='dashed']:not([data-disabled]):not([data-selected])
602
613
  :is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled) {
603
614
  background-color: var(--_subtle-active, ButtonFace);
604
615
  }
@@ -691,7 +702,8 @@
691
702
  border-color: var(--slotted-disabled-border, GrayText);
692
703
  }
693
704
 
694
- [data-ui-tag][data-part-root][data-variant='outline'][data-disabled] {
705
+ [data-ui-tag][data-part-root][data-variant='outline'][data-disabled],
706
+ [data-ui-tag][data-part-root][data-variant='dashed'][data-disabled] {
695
707
  background-color: transparent;
696
708
  border-color: var(--slotted-disabled-border, GrayText);
697
709
  }
@@ -103,6 +103,8 @@
103
103
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
104
104
  font-size: var(--_font-size);
105
105
  gap: var(--slotted-space-1, 0.125rem);
106
+ /* In a flex row the item's basis is its content, not the whole row. */
107
+ flex-basis: content;
106
108
  inline-size: 100%;
107
109
  min-block-size: var(--_height);
108
110
  min-inline-size: 0;
@@ -101,6 +101,8 @@
101
101
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
102
102
  font-size: var(--_font-size);
103
103
  gap: var(--_gap);
104
+ /* In a flex row the item's basis is its content, not the whole row. */
105
+ flex-basis: content;
104
106
  inline-size: 100%;
105
107
  /* A control in a grid track narrower than its own intrinsic width would
106
108
  otherwise refuse to shrink and take the drawer's edge with it. */
@@ -59,6 +59,8 @@
59
59
  display: block;
60
60
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
61
61
  font-size: var(--_font-size);
62
+ /* In a flex row the item's basis is its content, not the whole row. */
63
+ flex-basis: content;
62
64
  inline-size: 100%;
63
65
  /**
64
66
  * The text scale's leading rather than the control's `1`. A control's line
@@ -52,6 +52,8 @@
52
52
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
53
53
  font-size: var(--_font-size);
54
54
  gap: var(--_gap);
55
+ /* In a flex row the item's basis is its content, not the whole row. */
56
+ flex-basis: content;
55
57
  inline-size: 100%;
56
58
  min-block-size: var(--_height);
57
59
  min-inline-size: 0;
@@ -29,6 +29,8 @@
29
29
  */
30
30
  [data-ui-time-picker][data-part-root] {
31
31
  display: block;
32
+ /* In a flex row the item's basis is its content, not the whole row. */
33
+ flex-basis: content;
32
34
  /* The anchor the positioner measures is the control, and a block root
33
35
  lets the frame take the width the form gave it. */
34
36
  inline-size: 100%;
@@ -41,6 +41,8 @@
41
41
  */
42
42
  [data-ui-time-range-picker][data-part-root] {
43
43
  display: block;
44
+ /* In a flex row the item's basis is its content, not the whole row. */
45
+ flex-basis: content;
44
46
  /* The anchor the positioner measures is the control, and a block root
45
47
  lets the frame take the width the form gave it. */
46
48
  inline-size: 100%;