@expressivecss/expressive 0.4.0 → 0.6.0

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +4 -9
  3. package/dist/css/expressive.css +2617 -951
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/js/expressive.cjs +643 -804
  8. package/dist/js/expressive.cjs.map +4 -4
  9. package/dist/js/expressive.js +643 -804
  10. package/dist/js/expressive.js.map +4 -4
  11. package/dist/js/expressive.min.js +11 -11
  12. package/dist/js/expressive.min.js.map +4 -4
  13. package/dist/js/expressive.mjs +643 -804
  14. package/dist/js/expressive.mjs.map +4 -4
  15. package/dist/types/behaviors/bottomSheets.d.ts +18 -0
  16. package/dist/types/behaviors/sideSheets.d.ts +18 -0
  17. package/dist/types/components/autocomplete.d.ts +11 -11
  18. package/dist/types/components/index.d.ts +3 -5
  19. package/dist/types/components/{dropdown.d.ts → menu.d.ts} +38 -37
  20. package/dist/types/components/navigationRail.d.ts +53 -0
  21. package/dist/types/components/range.d.ts +3 -0
  22. package/dist/types/components/registry.d.ts +7 -15
  23. package/dist/types/components/select.d.ts +12 -12
  24. package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
  25. package/dist/types/index.d.ts +3 -1
  26. package/package.json +3 -2
  27. package/src/sass/README.md +13 -11
  28. package/src/sass/abstracts/_breakpoints.scss +14 -3
  29. package/src/sass/abstracts/_mixins.scss +3 -3
  30. package/src/sass/abstracts/_variables.scss +27 -2
  31. package/src/sass/base/_global.scss +1 -1
  32. package/src/sass/base/_grid.scss +66 -116
  33. package/src/sass/base/_index.scss +1 -1
  34. package/src/sass/components/_badges.scss +80 -60
  35. package/src/sass/components/_bottom-sheet.scss +137 -0
  36. package/src/sass/components/_cards.scss +4 -4
  37. package/src/sass/components/_chips.scss +6 -5
  38. package/src/sass/components/_dialog.scss +268 -0
  39. package/src/sass/components/_index.scss +9 -7
  40. package/src/sass/components/_list.scss +253 -0
  41. package/src/sass/components/_menu.scss +341 -0
  42. package/src/sass/components/_navbar.scss +65 -117
  43. package/src/sass/components/_navigation-bar.scss +165 -0
  44. package/src/sass/components/_navigation-rail.scss +308 -0
  45. package/src/sass/components/_page-footer.scss +7 -3
  46. package/src/sass/components/_panes.scss +294 -0
  47. package/src/sass/components/_side-sheet.scss +193 -0
  48. package/src/sass/components/_sidenav.scss +78 -49
  49. package/src/sass/components/{_toast.scss → _snackbar.scss} +35 -34
  50. package/src/sass/components/_tabs.scss +1 -27
  51. package/src/sass/components/_toolbar.scss +91 -25
  52. package/src/sass/components/_tooltip.scss +1 -1
  53. package/src/sass/components/forms/_fieldset.scss +1 -1
  54. package/src/sass/components/forms/_input-fields.scss +3 -3
  55. package/src/sass/components/forms/_range.scss +423 -98
  56. package/src/sass/components/forms/_select.scss +19 -17
  57. package/src/sass/tokens/_reference.scss +37 -13
  58. package/src/sass/tokens/_theme.scss +5 -13
  59. package/src/sass/utilities/_colors.scss +16 -74
  60. package/src/sass/utilities/_visibility.scss +8 -0
  61. package/dist/types/components/collapsible.d.ts +0 -79
  62. package/dist/types/components/pushpin.d.ts +0 -51
  63. package/dist/types/components/tapTarget.d.ts +0 -57
  64. package/src/sass/components/_collapsible.scss +0 -179
  65. package/src/sass/components/_collection.scss +0 -180
  66. package/src/sass/components/_dropdown.scss +0 -225
  67. package/src/sass/components/_modal.scss +0 -190
  68. package/src/sass/components/_pushpin.scss +0 -11
  69. package/src/sass/components/_tapTarget.scss +0 -187
@@ -9,9 +9,9 @@
9
9
  // or the layout (horizontal).
10
10
  //
11
11
  // Tokens follow https://m3.material.io/components/cards/specs
12
- // container surface, 12dp corners
12
+ // container surface-container-low, 12dp corners
13
13
  // elevated level 1, hover level 2
14
- // filled surface-variant, level 0
14
+ // filled surface-container-highest, level 0
15
15
  // outlined surface + 1dp outline, level 0
16
16
  // headline title-medium / on-surface
17
17
  // body body-medium / on-surface-variant
@@ -20,7 +20,7 @@
20
20
  $_card: "article";
21
21
 
22
22
  :where(#{$_card}) {
23
- --md-comp-elevated-card-container-color: var(--md-sys-color-surface);
23
+ --md-comp-elevated-card-container-color: var(--md-sys-color-surface-container-low);
24
24
  --md-comp-elevated-card-container-shape: 12px;
25
25
 
26
26
  position: relative;
@@ -43,7 +43,7 @@ $_card: "article";
43
43
 
44
44
  :where(#{$_card}).filled {
45
45
  @include z-depth("0");
46
- background-color: var(--md-sys-color-surface-variant);
46
+ background-color: var(--md-sys-color-surface-container-highest);
47
47
  }
48
48
 
49
49
  :where(#{$_card}).outlined,
@@ -6,7 +6,7 @@
6
6
  --padding: 8px;
7
7
 
8
8
  color: var(--md-sys-color-on-surface-variant);
9
- background-color: rgba(0, 0, 0, 0.09);
9
+ background-color: var(--md-sys-color-surface-container-low);
10
10
  display: inline-flex;
11
11
  white-space: nowrap;
12
12
  gap: 8px;
@@ -21,10 +21,11 @@
21
21
  user-select: none;
22
22
  vertical-align: top;
23
23
 
24
- &:focus {
24
+ &:focus,
25
+ &.active {
25
26
  outline: none;
26
- background-color: var(--md-sys-color-primary);
27
- color: var(--md-sys-color-on-primary);
27
+ background-color: var(--md-sys-color-secondary-container);
28
+ color: var(--md-sys-color-on-secondary-container);
28
29
  }
29
30
  }
30
31
 
@@ -60,7 +61,7 @@
60
61
  }
61
62
 
62
63
  .chip .close:hover {
63
- background-color: #8888;
64
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface-variant) 8%, transparent);
64
65
  }
65
66
 
66
67
  //--------------------------
@@ -0,0 +1,268 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Dialogs (M3 Expressive).
4
+ //
5
+ // Anatomy is the HTML. A <dialog> is a basic dialog: optional leading
6
+ // <i>, a heading, supporting <p> (or a wrapping <div>), optional <hr>
7
+ // + extra content, and a last-child <form method="dialog"> or <nav>
8
+ // as the action row. dialog.max is the full-screen variant: a <header>
9
+ // holds close, the headline, and the confirming action.
10
+ //
11
+ // Tokens follow https://m3.material.io/components/dialogs/specs
12
+ // basic surface-container-high, 28dp corners, 280–560dp, elevation 3
13
+ // headline headline-small / on-surface (centered when an icon leads)
14
+ // body body-medium / on-surface-variant
15
+ // icon 24dp, secondary
16
+ // actions text buttons, end-aligned, 8dp gap
17
+ // padding 24dp; 16dp between headline and body
18
+ // scrim 32% + 12px blur
19
+ // full-screen surface, 64dp header, no corners, no scrim
20
+
21
+ dialog {
22
+ --md-comp-basic-dialog-container-color: var(--md-sys-color-surface-container-high);
23
+ --md-comp-basic-dialog-container-shape: 28px;
24
+ --md-comp-basic-dialog-container-min-width: 280px;
25
+ --md-comp-basic-dialog-container-max-width: 560px;
26
+ --md-comp-basic-dialog-scrim-blur: 12px;
27
+
28
+ box-sizing: border-box;
29
+ width: min(var(--md-comp-basic-dialog-container-max-width), calc(100% - 48px));
30
+ min-width: min(var(--md-comp-basic-dialog-container-min-width), calc(100% - 48px));
31
+ max-height: min(70vh, calc(100% - 48px));
32
+ margin: auto;
33
+ padding: 0;
34
+ border: none;
35
+ border-radius: var(--md-comp-basic-dialog-container-shape);
36
+ background-color: var(--md-comp-basic-dialog-container-color);
37
+ color: var(--md-sys-color-on-surface);
38
+ outline: none;
39
+ @include z-depth("3");
40
+
41
+ &::backdrop {
42
+ background-color: color-mix(in oklab, var(--md-sys-color-scrim) 32%, transparent);
43
+ backdrop-filter: blur(var(--md-comp-basic-dialog-scrim-blur));
44
+ }
45
+ }
46
+
47
+ // showModal() puts the dialog in the top layer but does not lock the
48
+ // document scroller. :modal is the modal-only match — a modeless
49
+ // dialog.show() must not freeze the page.
50
+ html:has(dialog:modal) {
51
+ overflow: hidden;
52
+ }
53
+
54
+ dialog[open] {
55
+ display: flex;
56
+ flex-direction: column;
57
+ overflow: hidden;
58
+ overscroll-behavior: contain;
59
+ }
60
+
61
+ // Optional leading icon (M3 basic dialog).
62
+ dialog > i:first-child {
63
+ flex: 0 0 auto;
64
+ align-self: center;
65
+ margin: 24px 24px 0;
66
+ font-size: 24px;
67
+ width: 24px;
68
+ height: 24px;
69
+ line-height: 24px;
70
+ color: var(--md-sys-color-secondary);
71
+ }
72
+
73
+ dialog > :is(h1, h2, h3, h4, h5, h6) {
74
+ flex: 0 0 auto;
75
+ margin: 0;
76
+ padding: 24px 24px 16px;
77
+ color: var(--md-sys-color-on-surface);
78
+ @include typescale("headline-small");
79
+ }
80
+
81
+ dialog > i:first-child + :is(h1, h2, h3, h4, h5, h6) {
82
+ padding-top: 16px;
83
+ text-align: center;
84
+ }
85
+
86
+ dialog > p,
87
+ dialog > div {
88
+ flex: 1 1 auto;
89
+ min-height: 0;
90
+ overflow: auto;
91
+ overscroll-behavior: contain;
92
+ margin: 0;
93
+ padding: 0 24px 24px;
94
+ }
95
+
96
+ dialog > p {
97
+ color: var(--md-sys-color-on-surface-variant);
98
+ @include typescale("body-medium");
99
+ }
100
+
101
+ dialog > i:first-child + :is(h1, h2, h3, h4, h5, h6) + p {
102
+ text-align: center;
103
+ }
104
+
105
+ dialog > :is(h1, h2, h3, h4, h5, h6) + p {
106
+ padding-top: 0;
107
+ }
108
+
109
+ // Optional divider when extra content (a list, a form) follows the copy.
110
+ dialog > hr {
111
+ flex: 0 0 auto;
112
+ box-sizing: border-box;
113
+ width: 100%;
114
+ height: 1px;
115
+ margin: 0;
116
+ padding: 0;
117
+ border: 0;
118
+ background-color: var(--md-sys-color-outline-variant);
119
+ }
120
+
121
+ // Extra content. A .list inside the dialog lines up with the 24dp inset.
122
+ dialog > .list {
123
+ flex: 1 1 auto;
124
+ min-height: 0;
125
+ overflow: auto;
126
+ margin: 0;
127
+ --md-comp-list-item-padding: 24px;
128
+ }
129
+
130
+ // Action row. form[method=dialog] is the native close mechanism.
131
+ // Text buttons are the spec default; .filled / .tonal / .outlined opt in.
132
+ dialog > :is(form, nav):last-child {
133
+ display: flex;
134
+ flex-wrap: wrap;
135
+ justify-content: flex-end;
136
+ align-items: center;
137
+ gap: 8px;
138
+ flex: 0 0 auto;
139
+ margin: 0;
140
+ padding: 0 24px 24px;
141
+ border: 0;
142
+ background: none;
143
+ }
144
+
145
+ dialog:not(
146
+ .bottom,
147
+ .bottom-sheet,
148
+ .side-sheet,
149
+ .right,
150
+ .right-sheet,
151
+ .left,
152
+ .left-sheet,
153
+ .sidenav,
154
+ .sidenav-overlay
155
+ )
156
+ > :is(form, nav):last-child
157
+ > :is(button, a.button):not(.tonal, .outlined, .elevated, .filled) {
158
+ @include btn-flat;
159
+ }
160
+
161
+ // Full-screen. Fills the viewport; no corners, no elevation, no scrim.
162
+ // A <header> is the 64dp top bar: close, title-large headline, confirm.
163
+ // UA `dialog:modal` sets max-width: calc(100% - 2em - 6px). Without
164
+ // clearing it, width: 100% is capped and a strip of scrim shows on the
165
+ // right. Bottom sheet already overrides this.
166
+ dialog.max {
167
+ --md-comp-basic-dialog-container-color: var(--md-sys-color-surface);
168
+
169
+ width: 100%;
170
+ max-width: none;
171
+ height: 100%;
172
+ min-width: 0;
173
+ max-height: none;
174
+ margin: 0;
175
+ border-radius: 0;
176
+ @include z-depth("0");
177
+
178
+ &::backdrop {
179
+ background: none;
180
+ backdrop-filter: none;
181
+ }
182
+
183
+ > header {
184
+ display: flex;
185
+ align-items: center;
186
+ gap: 4px;
187
+ flex: 0 0 auto;
188
+ box-sizing: border-box;
189
+ min-height: 64px;
190
+ margin: 0;
191
+ padding: 8px 4px;
192
+ background: none;
193
+ box-shadow: none;
194
+ }
195
+
196
+ > header > :is(h1, h2, h3, h4, h5, h6) {
197
+ flex: 1 1 auto;
198
+ min-width: 0;
199
+ margin: 0;
200
+ padding: 0 12px;
201
+ text-align: start;
202
+ color: var(--md-sys-color-on-surface);
203
+ @include typescale("title-large");
204
+ }
205
+
206
+ > header > form {
207
+ display: flex;
208
+ flex: 0 0 auto;
209
+ align-items: center;
210
+ margin: 0;
211
+ padding: 0 8px 0 0;
212
+ border: 0;
213
+ background: none;
214
+ box-shadow: none;
215
+ }
216
+
217
+ // Close is a 48dp icon button. 4dp bar inset + 12dp to the glyph = 16dp.
218
+ > header > :is(button, a):has(> i:only-child) {
219
+ display: inline-flex;
220
+ flex: 0 0 48px;
221
+ align-items: center;
222
+ justify-content: center;
223
+ box-sizing: border-box;
224
+ width: 48px;
225
+ height: 48px;
226
+ min-width: 48px;
227
+ padding: 0;
228
+ border: none;
229
+ border-radius: 50%;
230
+ background-color: transparent;
231
+ color: var(--md-sys-color-on-surface-variant);
232
+ box-shadow: none;
233
+
234
+ > i {
235
+ font-size: 24px;
236
+ width: 24px;
237
+ height: 24px;
238
+ line-height: 24px;
239
+ }
240
+
241
+ &:hover {
242
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
243
+ }
244
+
245
+ &:focus-visible {
246
+ outline: 3px solid var(--md-sys-color-secondary);
247
+ outline-offset: 2px;
248
+ }
249
+ }
250
+
251
+ // Confirming action in the header is a text button, not an icon.
252
+ > header :is(button, a.button):not(:has(> i:only-child)) {
253
+ @include btn-flat;
254
+ width: auto;
255
+ min-width: 0;
256
+ height: 40px;
257
+ padding-inline: 12px;
258
+ border-radius: 20px;
259
+ }
260
+
261
+ > :is(p, div) {
262
+ padding: 8px 24px 24px;
263
+ }
264
+
265
+ > .list {
266
+ padding-block: 8px;
267
+ }
268
+ }
@@ -2,23 +2,25 @@
2
2
  // together and append new components at the end unless order matters.
3
3
 
4
4
  @forward "buttons";
5
- @forward "collection";
5
+ @forward "list";
6
6
  @forward "badges";
7
7
  @forward "icons-material-design";
8
8
  @forward "navbar";
9
+ @forward "navigation-bar";
10
+ @forward "navigation-rail";
9
11
  @forward "toolbar";
10
12
  @forward "transitions";
11
13
  @forward "cards";
12
- @forward "toast";
14
+ @forward "snackbar";
13
15
  @forward "tabs";
14
16
  @forward "tooltip";
15
- @forward "dropdown";
16
- @forward "modal";
17
- @forward "collapsible";
17
+ @forward "menu";
18
+ @forward "dialog";
19
+ @forward "bottom-sheet";
20
+ @forward "side-sheet";
18
21
  @forward "chips";
19
22
  @forward "lightbox";
20
23
  @forward "parallax";
21
- @forward "pushpin";
22
24
  @forward "docked-display";
23
25
  @forward "page-footer";
24
26
  @forward "forms";
@@ -28,9 +30,9 @@
28
30
  @forward "preloader";
29
31
  @forward "slider";
30
32
  @forward "carousel";
31
- @forward "tapTarget";
32
33
  @forward "pulse";
33
34
  @forward "datepicker";
34
35
  @forward "timepicker";
35
36
  @forward "breadcrumb";
36
37
  @forward "pagination";
38
+ @forward "panes";
@@ -0,0 +1,253 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // List. Anatomy is the HTML: a ul/ol/menu.list of items. A leading icon,
4
+ // image, or input is the first child; a trailing icon, kbd, button, time,
5
+ // or .meta is the last child; a following <p> is supporting text.
6
+ //
7
+ // Two variants (M3 Expressive):
8
+ // (default) standard — transparent rows, selected is a pill
9
+ // .segmented — each row is a rounded tile with a gap
10
+ //
11
+ // Tokens:
12
+ // --md-comp-list-item-height 56px
13
+ // --md-comp-list-item-two-line-height 72px
14
+ // --md-comp-list-item-padding 16px
15
+ // --md-comp-list-item-shape 100px (pill) / 20px segmented
16
+ // --md-comp-list-item-container-color transparent / surface mix
17
+ // --md-comp-list-selected-container-color secondary-container
18
+ // --md-comp-list-gap 16px (icon to text)
19
+ // --md-comp-list-leading-icon-size 24px
20
+ // --md-comp-list-trailing-icon-size 24px
21
+ // --md-comp-list-avatar-size 40px
22
+ // --md-comp-list-image-size 56px
23
+ // --md-comp-list-segmented-gap 2px
24
+ //
25
+ // Nest descendants inside this block.
26
+
27
+ .list {
28
+ --md-comp-list-item-height: 56px;
29
+ --md-comp-list-item-two-line-height: 72px;
30
+ --md-comp-list-item-padding: 16px;
31
+ --md-comp-list-item-shape: 100px;
32
+ --md-comp-list-item-container-color: transparent;
33
+ --md-comp-list-selected-container-color: var(--md-sys-color-secondary-container);
34
+ --md-comp-list-selected-color: var(--md-sys-color-on-secondary-container);
35
+ --md-comp-list-gap: 16px;
36
+ --md-comp-list-leading-icon-size: 24px;
37
+ --md-comp-list-trailing-icon-size: 24px;
38
+ --md-comp-list-avatar-size: 40px;
39
+ --md-comp-list-image-size: 56px;
40
+ --md-comp-list-segmented-gap: 2px;
41
+
42
+ box-sizing: border-box;
43
+ margin: $element-top-margin 0 $element-bottom-margin;
44
+ padding: 0;
45
+ list-style: none;
46
+ color: var(--md-sys-color-on-surface);
47
+
48
+ > li {
49
+ box-sizing: border-box;
50
+ margin: 0;
51
+ border-radius: var(--md-comp-list-item-shape);
52
+ background-color: var(--md-comp-list-item-container-color);
53
+ color: inherit;
54
+ transition: background-color 0.2s ease-out;
55
+ }
56
+
57
+ // The row grid lives on the item, or on a wrapping <a>/<label>.
58
+ > li:not(:has(> :is(a, label):only-child)),
59
+ > li > :is(a, label):only-child {
60
+ display: grid;
61
+ grid-template-columns: auto minmax(0, 1fr) auto;
62
+ grid-template-rows: auto auto;
63
+ align-items: center;
64
+ column-gap: var(--md-comp-list-gap);
65
+ box-sizing: border-box;
66
+ min-height: var(--md-comp-list-item-height);
67
+ padding: 8px var(--md-comp-list-item-padding);
68
+ @include typescale("body-large");
69
+
70
+ > :is(i, img, input):first-child {
71
+ grid-column: 1;
72
+ grid-row: 1 / -1;
73
+ align-self: center;
74
+ flex-shrink: 0;
75
+ }
76
+
77
+ > i:first-child:not(.circle) {
78
+ font-size: var(--md-comp-list-leading-icon-size);
79
+ width: var(--md-comp-list-leading-icon-size);
80
+ height: var(--md-comp-list-leading-icon-size);
81
+ color: var(--md-sys-color-on-surface-variant);
82
+ }
83
+
84
+ > img:first-child {
85
+ width: var(--md-comp-list-image-size);
86
+ height: var(--md-comp-list-image-size);
87
+ object-fit: cover;
88
+ border-radius: 8px;
89
+ }
90
+
91
+ > :is(img, i).circle {
92
+ width: var(--md-comp-list-avatar-size);
93
+ height: var(--md-comp-list-avatar-size);
94
+ border-radius: 50%;
95
+ object-fit: cover;
96
+ }
97
+
98
+ > i.circle {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ font-size: 20px;
103
+ line-height: 1;
104
+ background-color: var(--md-sys-color-primary-container);
105
+ color: var(--md-sys-color-on-primary-container);
106
+ }
107
+
108
+ > div:not(.meta),
109
+ > span {
110
+ grid-column: 2;
111
+ min-width: 0;
112
+ }
113
+
114
+ > p {
115
+ grid-column: 2;
116
+ grid-row: 2;
117
+ min-width: 0;
118
+ margin: 0;
119
+ color: var(--md-sys-color-on-surface-variant);
120
+ @include typescale("body-medium");
121
+ }
122
+
123
+ > :is(i, kbd, button, time, .meta, .badge, .button, a):last-child:not(:first-child) {
124
+ grid-column: 3;
125
+ grid-row: 1 / -1;
126
+ justify-self: end;
127
+ align-self: center;
128
+ }
129
+
130
+ > i:last-child:not(:first-child) {
131
+ font-size: var(--md-comp-list-trailing-icon-size);
132
+ width: var(--md-comp-list-trailing-icon-size);
133
+ height: var(--md-comp-list-trailing-icon-size);
134
+ color: var(--md-sys-color-on-surface-variant);
135
+ }
136
+
137
+ > :is(kbd, time, .meta):last-child {
138
+ color: var(--md-sys-color-on-surface-variant);
139
+ @include typescale("label-small");
140
+ }
141
+
142
+ > kbd:last-child {
143
+ font-family: inherit;
144
+ border: 0;
145
+ background: none;
146
+ padding: 0;
147
+ }
148
+
149
+ > button:last-child:not(:first-child):not(.button),
150
+ > a:last-child:not(:first-child):not(.button):has(> i:only-child) {
151
+ display: inline-flex;
152
+ align-items: center;
153
+ justify-content: center;
154
+ padding: 0;
155
+ border: 0;
156
+ background: transparent;
157
+ color: inherit;
158
+ cursor: pointer;
159
+ appearance: none;
160
+ @include focus-visible;
161
+ }
162
+
163
+ &:has(> p),
164
+ &:has(> div:not(.meta) > p) {
165
+ min-height: var(--md-comp-list-item-two-line-height);
166
+ }
167
+
168
+ &:has(> img:first-child:not(.circle)) {
169
+ min-height: calc(var(--md-comp-list-image-size) + 16px);
170
+ }
171
+ }
172
+
173
+ > li > :is(a, label):only-child {
174
+ color: inherit;
175
+ text-decoration: none;
176
+ border-radius: inherit;
177
+ cursor: pointer;
178
+ @include focus-visible;
179
+ }
180
+
181
+ > li:not(.active):not([aria-selected="true"]):not([aria-current]):not(:has(> [aria-current])):not(:has([aria-selected="true"])):not(:has(:checked)):hover {
182
+ background-color: color-mix(
183
+ in oklab,
184
+ var(--md-sys-color-on-surface) 8%,
185
+ var(--md-comp-list-item-container-color)
186
+ );
187
+ }
188
+
189
+ > li.active,
190
+ > li[aria-selected="true"],
191
+ > li[aria-current],
192
+ > li:has(> [aria-current]),
193
+ > li:has([aria-selected="true"]),
194
+ > li:has(:checked) {
195
+ background-color: var(--md-comp-list-selected-container-color);
196
+ color: var(--md-comp-list-selected-color);
197
+
198
+ i,
199
+ p,
200
+ kbd,
201
+ time,
202
+ .meta {
203
+ color: inherit;
204
+ }
205
+
206
+ > i:first-child,
207
+ > :is(a, label):only-child > i:first-child {
208
+ --md-icon-fill: 1;
209
+ }
210
+ }
211
+
212
+ > li:has(> :is(h1, h2, h3, h4, h5, h6):only-child) {
213
+ min-height: 0;
214
+ padding: 16px var(--md-comp-list-item-padding) 8px;
215
+ background: transparent;
216
+ pointer-events: none;
217
+ color: var(--md-sys-color-on-surface-variant);
218
+
219
+ > :is(h1, h2, h3, h4, h5, h6) {
220
+ margin: 0;
221
+ @include typescale("title-small");
222
+ }
223
+ }
224
+
225
+ > li.divider {
226
+ height: 1px;
227
+ min-height: 0;
228
+ padding: 0;
229
+ margin: 8px var(--md-comp-list-item-padding);
230
+ border-radius: 0;
231
+ background-color: var(--md-sys-color-outline-variant);
232
+ pointer-events: none;
233
+ }
234
+
235
+ > li.disabled,
236
+ > li[aria-disabled="true"] {
237
+ pointer-events: none;
238
+ color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
239
+ }
240
+
241
+ &.segmented {
242
+ --md-comp-list-item-container-color: color-mix(
243
+ in oklab,
244
+ var(--md-sys-color-on-surface) 8%,
245
+ var(--md-sys-color-surface)
246
+ );
247
+ --md-comp-list-item-shape: 20px;
248
+
249
+ display: flex;
250
+ flex-direction: column;
251
+ gap: var(--md-comp-list-segmented-gap);
252
+ }
253
+ }