@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
@@ -0,0 +1,294 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Material 3 Canonical Pane Layouts.
4
+ //
5
+ // Anatomy is the HTML. A container (`.panes` or `.pane-layout` or `.list-detail`)
6
+ // contains two (or three) `.pane` children.
7
+ //
8
+ // Canonical Layouts:
9
+ // 1. List-Detail (.list-detail, .panes.list-detail):
10
+ // - Compact (< 840px / < 601px): Single pane visible at a time.
11
+ // - Expanded (>= 840px): 360dp list pane + 1fr detail pane.
12
+ // 2. Supporting Pane (.supporting-pane-layout, .panes.supporting):
13
+ // - 1fr primary pane + 360-400dp supporting pane (on trailing or leading side).
14
+ // 3. Equal / Proportional (.panes.equal, .panes.proportional):
15
+ // - 1fr 1fr side-by-side.
16
+ //
17
+ // Appearances:
18
+ // - Coplanar (default): Full-bleed surfaces with a 1px outline-variant divider.
19
+ // - Separated / Floating (.separated, .floating): 16dp/24dp rounded surfaces
20
+ // with surface-container-low and a 24dp gap.
21
+ //
22
+ // Tokens follow https://m3.material.io/foundations/adaptive-design/canonical-layouts
23
+ // --md-comp-pane-gap 24px
24
+ // --md-comp-pane-divider-color outline-variant
25
+ // --md-comp-pane-container-color surface
26
+ // --md-comp-pane-container-shape 0px
27
+ // --md-comp-pane-list-width 360px
28
+ // --md-comp-pane-supporting-width 360px
29
+ // --md-comp-pane-primary-min-width 360px
30
+
31
+ .panes,
32
+ .pane-layout,
33
+ .list-detail,
34
+ .supporting-pane-layout {
35
+ --md-comp-pane-gap: 24px;
36
+ --md-comp-pane-divider-color: var(--md-sys-color-outline-variant);
37
+ --md-comp-pane-container-color: var(--md-sys-color-surface);
38
+ --md-comp-pane-container-shape: 0px;
39
+ --md-comp-pane-list-width: 360px;
40
+ --md-comp-pane-supporting-width: 360px;
41
+ --md-comp-pane-primary-min-width: 360px;
42
+
43
+ box-sizing: border-box;
44
+ display: grid;
45
+ width: 100%;
46
+ height: 100%;
47
+ min-height: 0;
48
+ margin: 0;
49
+ padding: 0;
50
+ container-type: inline-size;
51
+ background-color: var(--md-comp-pane-container-color);
52
+ color: var(--md-sys-color-on-surface);
53
+
54
+ // Default (Single-Pane on compact screens < 840px / < 601px)
55
+ grid-template-columns: 1fr;
56
+ gap: 0;
57
+
58
+ // Panes in compact mode: list/primary visible by default, detail/supporting hidden
59
+ // unless marked .active
60
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane) {
61
+ display: none;
62
+ min-width: 0;
63
+ min-height: 0;
64
+ overflow: hidden;
65
+
66
+ &.active {
67
+ display: flex;
68
+ }
69
+ }
70
+
71
+ &:not(:has(> :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane).active)) {
72
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane):first-child {
73
+ display: flex;
74
+ }
75
+ }
76
+
77
+ // Expanded Viewports: Dual-pane side-by-side (via container query or breakpoint)
78
+ @media (width >= 840px) {
79
+ grid-template-columns: var(--md-comp-pane-list-width) 1fr;
80
+ gap: 0;
81
+
82
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane) {
83
+ display: flex !important;
84
+ }
85
+ }
86
+
87
+ @container (min-width: 840px) {
88
+ grid-template-columns: var(--md-comp-pane-list-width) 1fr;
89
+ gap: 0;
90
+
91
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane) {
92
+ display: flex !important;
93
+ }
94
+ }
95
+ }
96
+
97
+ // ---------------------------------------------------------------------------
98
+ // Canonical Variants
99
+ // ---------------------------------------------------------------------------
100
+
101
+ // 1. Supporting Pane Layout
102
+ .supporting-pane-layout,
103
+ .panes.supporting {
104
+ @media (width >= 840px) {
105
+ grid-template-columns: 1fr var(--md-comp-pane-supporting-width);
106
+ }
107
+
108
+ @container (min-width: 840px) {
109
+ grid-template-columns: 1fr var(--md-comp-pane-supporting-width);
110
+ }
111
+
112
+ // Leading supporting pane (.start / .left)
113
+ &.start,
114
+ &.left {
115
+ @media (width >= 840px) {
116
+ grid-template-columns: var(--md-comp-pane-supporting-width) 1fr;
117
+ }
118
+
119
+ @container (min-width: 840px) {
120
+ grid-template-columns: var(--md-comp-pane-supporting-width) 1fr;
121
+ }
122
+ }
123
+ }
124
+
125
+ // 2. Equal / Proportional Pane Layout
126
+ .panes.equal,
127
+ .pane-layout.equal {
128
+ @media (width >= 840px) {
129
+ grid-template-columns: 1fr 1fr;
130
+ }
131
+
132
+ @container (min-width: 840px) {
133
+ grid-template-columns: 1fr 1fr;
134
+ }
135
+ }
136
+
137
+ // 3. Three-Pane Layout (List + Primary Focus + Supporting)
138
+ .panes.three-pane,
139
+ .pane-layout.three-pane {
140
+ @media (width >= 1200px) {
141
+ grid-template-columns: var(--md-comp-pane-list-width) 1fr var(--md-comp-pane-supporting-width);
142
+ }
143
+
144
+ @container (min-width: 1200px) {
145
+ grid-template-columns: var(--md-comp-pane-list-width) 1fr var(--md-comp-pane-supporting-width);
146
+ }
147
+ }
148
+
149
+ // ---------------------------------------------------------------------------
150
+ // Separated / Floating Appearance
151
+ // ---------------------------------------------------------------------------
152
+ .panes.separated,
153
+ .panes.floating,
154
+ .pane-layout.separated,
155
+ .pane-layout.floating {
156
+ --md-comp-pane-container-shape: 16px;
157
+ --md-comp-pane-container-color: transparent;
158
+ gap: var(--md-comp-pane-gap);
159
+ padding: var(--md-comp-pane-gap);
160
+
161
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane) {
162
+ border: none;
163
+ border-radius: var(--md-comp-pane-container-shape);
164
+ background-color: var(--md-sys-color-surface-container-low);
165
+ @include z-depth("0");
166
+
167
+ &.elevated {
168
+ background-color: var(--md-sys-color-surface-container-low);
169
+ @include z-depth("1");
170
+ }
171
+
172
+ &.outlined {
173
+ background-color: var(--md-sys-color-surface);
174
+ border: 1px solid var(--md-comp-pane-divider-color);
175
+ }
176
+ }
177
+ }
178
+
179
+ // ---------------------------------------------------------------------------
180
+ // Coplanar / Docked Dividers (Default)
181
+ // ---------------------------------------------------------------------------
182
+ :is(.panes, .pane-layout, .list-detail, .supporting-pane-layout):not(.separated, .floating) {
183
+ > :is(.pane, .list-pane, .primary-pane, .detail-pane, .supporting-pane):not(:last-child) {
184
+ @media (width >= 840px) {
185
+ border-inline-end: 1px solid var(--md-comp-pane-divider-color);
186
+ }
187
+
188
+ @container (min-width: 840px) {
189
+ border-inline-end: 1px solid var(--md-comp-pane-divider-color);
190
+ }
191
+ }
192
+ }
193
+
194
+ // ---------------------------------------------------------------------------
195
+ // Pane Internal Anatomy
196
+ // ---------------------------------------------------------------------------
197
+ .pane,
198
+ .list-pane,
199
+ .primary-pane,
200
+ .detail-pane,
201
+ .supporting-pane {
202
+ box-sizing: border-box;
203
+ flex-direction: column;
204
+ position: relative;
205
+ width: 100%;
206
+ height: 100%;
207
+ min-width: 0;
208
+ min-height: 0;
209
+
210
+ // Header Bar (64dp height, Title Large, action icons)
211
+ > :is(header, .pane-header) {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 12px;
215
+ flex: 0 0 auto;
216
+ box-sizing: border-box;
217
+ min-height: 64px;
218
+ margin: 0;
219
+ padding: 8px 16px;
220
+ background: none;
221
+
222
+ > :is(h1, h2, h3, h4, h5, h6, .pane-title) {
223
+ flex: 1 1 auto;
224
+ min-width: 0;
225
+ margin: 0;
226
+ padding: 0;
227
+ color: var(--md-sys-color-on-surface);
228
+ @include typescale("title-large");
229
+ white-space: nowrap;
230
+ overflow: hidden;
231
+ text-overflow: ellipsis;
232
+ }
233
+
234
+ > :is(button, a.button):has(> i:only-child) {
235
+ flex: 0 0 48px;
236
+ box-sizing: border-box;
237
+ width: 48px;
238
+ height: 48px;
239
+ min-width: 48px;
240
+ padding: 0;
241
+ border: none;
242
+ border-radius: 50%;
243
+ background-color: transparent;
244
+ color: var(--md-sys-color-on-surface-variant);
245
+ box-shadow: none;
246
+
247
+ > i {
248
+ font-size: 24px;
249
+ width: 24px;
250
+ height: 24px;
251
+ line-height: 24px;
252
+ }
253
+
254
+ &:hover {
255
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
256
+ }
257
+
258
+ &:focus-visible {
259
+ outline: 3px solid var(--md-sys-color-secondary);
260
+ outline-offset: 2px;
261
+ }
262
+ }
263
+ }
264
+
265
+ // Scrollable Content Body
266
+ > :is(main, .pane-content, .pane-body, div:not(.pane-header, .pane-footer)) {
267
+ flex: 1 1 auto;
268
+ min-height: 0;
269
+ overflow-y: auto;
270
+ overscroll-behavior: contain;
271
+ padding: 16px 24px;
272
+ }
273
+
274
+ // Direct list inside pane (fills list seamlessly without padding clip)
275
+ > .list {
276
+ flex: 1 1 auto;
277
+ min-height: 0;
278
+ overflow-y: auto;
279
+ overscroll-behavior: contain;
280
+ margin: 0;
281
+ }
282
+
283
+ // Footer / Action Bar
284
+ > :is(footer, .pane-footer, nav:last-child) {
285
+ display: flex;
286
+ align-items: center;
287
+ gap: 8px;
288
+ flex: 0 0 auto;
289
+ box-sizing: border-box;
290
+ min-height: 56px;
291
+ padding: 8px 16px;
292
+ border-block-start: 1px solid var(--md-comp-pane-divider-color);
293
+ }
294
+ }
@@ -0,0 +1,193 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Side sheets.
4
+ //
5
+ // Anatomy is the HTML. A dialog.side-sheet (or .right / .left) is the
6
+ // surface, docked to the trailing edge by default. showModal() is the
7
+ // modal variant (scrim, rounded inner corners). show() is the standard
8
+ // variant (no scrim, a divider on the inner edge, page stays interactive).
9
+ //
10
+ // A <header> is the top bar: an optional back button, a heading, and a
11
+ // close control (form[method=dialog] with an icon button). Body content
12
+ // is a <div> or <p>. A last-child form[method=dialog] is the action row.
13
+ //
14
+ // Tokens follow https://m3.material.io/components/side-sheets
15
+ // container surface-container-low, 400dp, full height
16
+ // standard coplanar, 1dp outline-variant rule on the inner edge
17
+ // modal 28dp inner corners, elevation 1, scrim
18
+ // header 64dp, title-large, 24dp inset, 48dp icon buttons
19
+ // actions 16dp pad, outline-variant rule above
20
+ //
21
+ // Standard is for large windows next to the main pane. Modal is for
22
+ // compact/medium, or whenever the sheet should interrupt.
23
+
24
+ $_sheet: "dialog.side-sheet, dialog.right, dialog.right-sheet, dialog.left, dialog.left-sheet";
25
+
26
+ #{$_sheet} {
27
+ --md-comp-side-sheet-container-color: var(--md-sys-color-surface-container-low);
28
+ --md-comp-side-sheet-container-shape: 28px;
29
+ --md-comp-side-sheet-container-width: 400px;
30
+ --md-comp-side-sheet-shift: 0px;
31
+
32
+ box-sizing: border-box;
33
+ position: fixed;
34
+ float: none !important;
35
+ inset-block: 0;
36
+ inset-inline-start: auto;
37
+ inset-inline-end: 0;
38
+ width: min(var(--md-comp-side-sheet-container-width), 85%);
39
+ max-width: var(--md-comp-side-sheet-container-width);
40
+ height: auto;
41
+ max-height: none;
42
+ min-width: 0;
43
+ min-height: 0;
44
+ margin: 0;
45
+ padding: 0;
46
+ border: none;
47
+ background-color: var(--md-comp-side-sheet-container-color);
48
+ color: var(--md-sys-color-on-surface);
49
+ outline: none;
50
+ translate: var(--md-comp-side-sheet-shift) 0;
51
+ transition: translate 280ms ease, border-radius 200ms ease;
52
+
53
+ &:not(:modal) {
54
+ z-index: 1100;
55
+ border-radius: 0;
56
+ box-shadow: none;
57
+ // Standard: attached to the page, inner edge is a divider.
58
+ border-inline-start: 1px solid var(--md-sys-color-outline-variant);
59
+ }
60
+
61
+ &:modal {
62
+ border-radius: var(--md-comp-side-sheet-container-shape) 0 0
63
+ var(--md-comp-side-sheet-container-shape);
64
+ @include z-depth("1");
65
+ }
66
+
67
+ &:not(:modal)::backdrop {
68
+ background: none;
69
+ backdrop-filter: none;
70
+ }
71
+
72
+ // Leading-edge dock.
73
+ &.left,
74
+ &.left-sheet,
75
+ &.start {
76
+ inset-inline-start: 0;
77
+ inset-inline-end: auto;
78
+
79
+ &:not(:modal) {
80
+ border-inline-start: 0;
81
+ border-inline-end: 1px solid var(--md-sys-color-outline-variant);
82
+ }
83
+
84
+ &:modal {
85
+ border-radius: 0 var(--md-comp-side-sheet-container-shape)
86
+ var(--md-comp-side-sheet-container-shape) 0;
87
+ }
88
+ }
89
+
90
+ > header {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 12px;
94
+ flex: 0 0 auto;
95
+ box-sizing: border-box;
96
+ min-height: 64px;
97
+ margin: 0;
98
+ padding: 8px 12px 8px 24px;
99
+ background: none;
100
+ box-shadow: none;
101
+ }
102
+
103
+ > header:has(> :is(button, a):first-child) {
104
+ padding-inline-start: 8px;
105
+ }
106
+
107
+ > header > :is(h1, h2, h3, h4, h5, h6) {
108
+ flex: 1 1 auto;
109
+ min-width: 0;
110
+ margin: 0;
111
+ padding: 0;
112
+ color: var(--md-sys-color-on-surface);
113
+ @include typescale("title-large");
114
+ }
115
+
116
+ > header > form {
117
+ display: flex;
118
+ flex: 0 0 auto;
119
+ align-items: center;
120
+ margin: 0;
121
+ padding: 0;
122
+ border: 0;
123
+ background: none;
124
+ box-shadow: none;
125
+ }
126
+
127
+ > header :is(button, a.button) {
128
+ flex: 0 0 48px;
129
+ box-sizing: border-box;
130
+ width: 48px;
131
+ height: 48px;
132
+ min-width: 48px;
133
+ padding: 0;
134
+ border: none;
135
+ border-radius: 50%;
136
+ background-color: transparent;
137
+ color: var(--md-sys-color-on-surface-variant);
138
+ box-shadow: none;
139
+
140
+ > i {
141
+ font-size: 24px;
142
+ width: 24px;
143
+ height: 24px;
144
+ line-height: 24px;
145
+ }
146
+
147
+ &:hover {
148
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
149
+ }
150
+
151
+ &:focus-visible {
152
+ outline: 3px solid var(--md-sys-color-secondary);
153
+ outline-offset: 2px;
154
+ }
155
+ }
156
+
157
+ > :is(form, nav):last-child {
158
+ justify-content: flex-start;
159
+ gap: 8px;
160
+ padding: 16px 24px;
161
+ border-block-start: 1px solid var(--md-sys-color-outline-variant);
162
+ }
163
+ }
164
+
165
+ // :is() so [open] applies to every alternative. `#{$_sheet}[open]` only
166
+ // suffixes the last selector and would paint a closed .side-sheet.
167
+ :is(#{$_sheet}):not([open]) {
168
+ display: none;
169
+ }
170
+
171
+ :is(#{$_sheet})[open] {
172
+ display: flex;
173
+ flex-direction: column;
174
+ }
175
+
176
+ @starting-style {
177
+ dialog.side-sheet[open],
178
+ dialog.right[open],
179
+ dialog.right-sheet[open] {
180
+ translate: 100% 0;
181
+ }
182
+
183
+ dialog.left[open],
184
+ dialog.left-sheet[open] {
185
+ translate: -100% 0;
186
+ }
187
+ }
188
+
189
+ @media (prefers-reduced-motion: reduce) {
190
+ #{$_sheet} {
191
+ transition: none;
192
+ }
193
+ }
@@ -8,6 +8,10 @@
8
8
  // and a scrim tap close it. Drag writes --md-comp-nav-drawer-shift;
9
9
  // this file does the slide.
10
10
  //
11
+ // Nested sections are native <details>/<summary>. Same `name` is an
12
+ // accordion. The summary is a destination row with an expand_more
13
+ // chevron; there is no Collapsible plugin.
14
+ //
11
15
  // .sidenav-fixed is a breakpoint, not a JS open(): at `large` the host
12
16
  // is display: contents so the list is a docked sidebar. Below that it
13
17
  // is the same overlay drawer as any other sidenav.
@@ -51,7 +55,7 @@ dialog.sidenav {
51
55
  inset: 0 auto 0 0;
52
56
  overflow: hidden;
53
57
  color: var(--md-sys-color-on-surface);
54
- background-color: var(--md-sys-color-surface);
58
+ background-color: var(--md-sys-color-surface-container-low);
55
59
  outline: none;
56
60
  @include z-depth("1");
57
61
 
@@ -143,7 +147,7 @@ dialog.sidenav {
143
147
  overscroll-behavior: contain;
144
148
  user-select: none;
145
149
  color: var(--md-sys-color-on-surface);
146
- background-color: var(--md-sys-color-surface);
150
+ background-color: var(--md-sys-color-surface-container-low);
147
151
  transform: translateX(-100%);
148
152
  @include z-depth("1");
149
153
 
@@ -152,10 +156,6 @@ dialog.sidenav {
152
156
  transform: translateX(100%);
153
157
  }
154
158
 
155
- .collapsible {
156
- margin: 0;
157
- }
158
-
159
159
  li {
160
160
  list-style: none;
161
161
  display: grid;
@@ -163,14 +163,11 @@ dialog.sidenav {
163
163
  }
164
164
 
165
165
  li.active > a:not(.button, .circle, .extra) {
166
- background-color: color-mix(in oklab, var(--md-sys-color-secondary) 10%, transparent);
166
+ background-color: var(--md-sys-color-secondary-container);
167
+ color: var(--md-sys-color-on-secondary-container);
167
168
  }
168
169
 
169
- details > div > ul {
170
- padding-left: 10px;
171
- }
172
-
173
- li > a {
170
+ :is(li > a, summary) {
174
171
  display: flex;
175
172
  align-items: center;
176
173
  margin: 0 12px;
@@ -181,22 +178,6 @@ dialog.sidenav {
181
178
  font-size: var(--md-comp-nav-drawer-font-size);
182
179
  font-weight: 500;
183
180
 
184
- &:not(.button, .circle, .extra) {
185
- color: var(--md-sys-color-on-secondary-container);
186
-
187
- &:hover {
188
- background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
189
- }
190
-
191
- @include focus-visible;
192
- }
193
-
194
- &.button,
195
- &.circle,
196
- &.extra {
197
- margin: 10px 15px;
198
- }
199
-
200
181
  > :is(
201
182
  .material-symbols,
202
183
  .material-symbols-outlined,
@@ -210,6 +191,75 @@ dialog.sidenav {
210
191
  }
211
192
  }
212
193
 
194
+ li > a:not(.button, .circle, .extra),
195
+ summary {
196
+ color: var(--md-sys-color-on-surface-variant);
197
+
198
+ &:hover {
199
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
200
+ }
201
+
202
+ @include focus-visible;
203
+ }
204
+
205
+ li > a.button,
206
+ li > a.circle,
207
+ li > a.extra {
208
+ margin: 10px 15px;
209
+ }
210
+
211
+ summary {
212
+ box-sizing: border-box;
213
+ border: 0;
214
+ background: transparent;
215
+ font: inherit;
216
+ text-align: start;
217
+ list-style: none;
218
+ cursor: pointer;
219
+ appearance: none;
220
+
221
+ &::-webkit-details-marker {
222
+ display: none;
223
+ }
224
+
225
+ &::marker {
226
+ content: none;
227
+ }
228
+
229
+ &::after {
230
+ content: "expand_more";
231
+ flex-shrink: 0;
232
+ margin-inline-start: auto;
233
+ font-family: var(--md-icon-font);
234
+ font-size: 24px;
235
+ font-style: normal;
236
+ font-variation-settings:
237
+ "FILL" var(--md-icon-fill),
238
+ "wght" var(--md-icon-weight),
239
+ "GRAD" var(--md-icon-grade),
240
+ "opsz" var(--md-icon-optical-size);
241
+ line-height: 1;
242
+ -webkit-font-smoothing: antialiased;
243
+ transition: transform var(--md-comp-nav-drawer-duration, 250ms)
244
+ var(--md-comp-nav-drawer-easing, ease);
245
+ }
246
+ }
247
+
248
+ details {
249
+ margin: 0;
250
+ }
251
+
252
+ details[open] > summary::after {
253
+ transform: rotate(180deg);
254
+ }
255
+
256
+ details > ul {
257
+ margin: 0;
258
+ padding: 0;
259
+ padding-inline-start: 10px;
260
+ list-style: none;
261
+ }
262
+
213
263
  .divider {
214
264
  margin: calc(var(--md-comp-nav-drawer-padding) * 0.5) 0 0;
215
265
  }
@@ -333,25 +383,4 @@ dialog.sidenav-overlay:modal > .sidenav {
333
383
  }
334
384
  }
335
385
 
336
- .sidenav details > :not(summary) {
337
- padding: 0;
338
- }
339
386
 
340
- .sidenav,
341
- .sidenav.sidenav-fixed {
342
- .collapsible {
343
- overflow: visible;
344
- border: none;
345
- border-radius: 0;
346
- background: transparent;
347
- box-shadow: none;
348
- }
349
-
350
- summary {
351
- border: none;
352
- }
353
-
354
- details > :not(summary) {
355
- border: none;
356
- }
357
- }