@swiftwc/ui 0.0.0-dev.41 → 0.0.0-dev.43

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.
@@ -82,6 +82,7 @@ $list-ifs: (
82
82
  --list--opensummary-color: var(--sidebarlist-opensummary-color,),
83
83
  //
84
84
  // --list--item-grid-template-columns: minmax(0, 1fr),
85
+ --list--accessories-size: 0rem,
85
86
  --list--accessories-display: none,
86
87
  //
87
88
  --list--rootsummary-marker-display: marker-trailing,
@@ -108,7 +109,7 @@ $list-elses: (
108
109
  --list--accessories-display: grid,
109
110
  );
110
111
 
111
- @layer #{vars.$components-layer} {
112
+ @layer #{vars.$list-components-layer} {
112
113
  list-view {
113
114
  &:not(& &, [is='form-view'] &, table-view &) {
114
115
  @extend %list;
@@ -118,26 +119,12 @@ $list-elses: (
118
119
  --list--section-gap: var(--list-row-gap);
119
120
 
120
121
  @include mixins.write-props($list-elses);
121
- // --list--item-padding-inline-start: var(--list-item-padding-inline-start);
122
- // --list--item-padding-inline-end: var(--list-item-padding-inline-end);
123
- // --list--item-padding-block-start: var(--list-item-padding-block-start);
124
- // --list--item-padding-block-end: var(--list-item-padding-block-end);
125
-
126
- // --list--item-background-color: var(--list-item-background-color,);
127
122
  }
128
123
 
129
124
  // SECTION: ifs
130
125
  @supports (x: #{string.unquote('if(else:red)')}) {
131
126
  :where(&) {
132
- @include mixins.write-ifs(--list-style, $list-ifs, $list-elses);
133
- // --list--root-padding-inline: if(style(--list-style: inset-grouped): 0.5rem ; style(--list-style: sidebar): 0.5rem ;);
134
-
135
- // --toolbaritemradius: if(style(--list-style: inset-grouped): 1rem ; style(--list-style: sidebar): 1rem ;);
136
-
137
- // --list--separator-block-size: if(style(--list-style: sidebar): 0px ;);
138
- // --list--separator-visibility: if(style(--list-style: collapse): 0px ;);
139
-
140
- // --list--root-background-color: if(style(--list-style: sidebar): transparent ;);
127
+ @include mixins.write-ifs(--list-style, $list-ifs, $list-elses); // --list--root-padding-inline: if(style(--list-style: inset-grouped): 0.5rem ; style(--list-style: sidebar): 0.5rem ;);
141
128
  }
142
129
  }
143
130
 
@@ -146,12 +133,16 @@ $list-elses: (
146
133
  :where(&:not([list-style])) {
147
134
  @each $v in vars.$list-styles {
148
135
  @container style(--list-style: #{$v}) {
136
+ --list-style: #{$v}; // NOTE: used ONLY for tinted buttons
137
+
149
138
  @include mixins.write-props(map.get($list-ifs, $v));
150
139
  }
151
140
  }
152
141
  }
153
142
  @each $v in vars.$list-styles {
154
143
  :where(&[list-style='#{$v}']) {
144
+ --list-style: #{$v}; // NOTE: used ONLY for tinted buttons
145
+
155
146
  @include mixins.write-props(map.get($list-ifs, $v));
156
147
  }
157
148
  }
@@ -180,6 +171,64 @@ $list-elses: (
180
171
  }
181
172
  }
182
173
 
174
+ // FINALLY AFTER ALL IFS
175
+
176
+ // NOTE: on safari takes it from manually setting it above
177
+ // make list-buttons tintable
178
+ @container not style(--list-style: sidebar) {
179
+ button[list-item-tint] {
180
+ :where(&) {
181
+ --itemhighlightface: var(--accentColor3);
182
+ --itemactiveface: var(--accentColor3);
183
+ }
184
+ &:not([is='navigation-link']) {
185
+ --itemtext: var(--accentColor);
186
+ --itemhighlighttext: var(--accentColor);
187
+ --itemactivetext: var(--accentColor);
188
+ }
189
+ }
190
+ }
191
+ @container style(--list-style: sidebar) {
192
+ button[list-item-tint] {
193
+ :where(&) {
194
+ --itemhighlightface: var(--accentColor);
195
+ --itemactiveface: var(--accentColor);
196
+ }
197
+ }
198
+ }
199
+
200
+ // TODO: Also apply this on state of sidebar w/ full-screen detail 1/2
201
+ @include mixins.if-content-view-list {
202
+ :where(&) {
203
+ --list--accessories-size: 0rem;
204
+ --list--accessories-display: none;
205
+
206
+ --insetlist-highlighteditem-background-color: var(--accentColor);
207
+ --insetlist-highlighteditem-color: var(--tintcontrast);
208
+ --insetgroupedlist-highlighteditem-background-color: var(--accentColor);
209
+ --insetgroupedlist-highlighteditem-color: var(--tintcontrast);
210
+ }
211
+
212
+ // override tint colors of tintable buttons
213
+ @container style(--list-style: inset) or style(--list-style: inset-grouped) {
214
+ button[list-item-tint] {
215
+ :where(&) {
216
+ // --itemhighlighttext: var(--tintcontrast);
217
+ // --itemactivetext: var(--tintcontrast);
218
+
219
+ --itemhighlightface: var(--accentColor);
220
+ --itemactiveface: var(--accentColor);
221
+ }
222
+ }
223
+ }
224
+ }
225
+
226
+ // Hide accessories
227
+ :where(&[navigation-link-indicator-visibility='hidden']) {
228
+ --list--accessories-size: 0rem;
229
+ --list--accessories-display: none;
230
+ }
231
+
183
232
  &[preferred-root-disclosure-style='sidebar'] {
184
233
  --list--rootsummary-color: var(--primary);
185
234
  --list--selectedrootsummary-color: var(--primary);
@@ -215,15 +264,6 @@ $list-elses: (
215
264
  }
216
265
  }
217
266
  }
218
-
219
- // FINALLY AFTER ALL IFS
220
- // TODO: Also apply this on state of sidebar w/ full-screen detail 1/2
221
- @include mixins.if-2col-split-view-fits {
222
- :where(navigation-split-view > scroll-view &, navigation-split-view > body-view > scroll-view &) {
223
- // --list--item-grid-template-columns: minmax(0, 1fr);
224
- --list--accessories-display: none;
225
- }
226
- }
227
267
  }
228
268
  }
229
269
  }
@@ -155,15 +155,17 @@
155
155
  --menuitemface: var(--menuitemhighlightface,);
156
156
  --menuitemtext: var(--menuitemhighlighttext,);
157
157
 
158
- --secondary: var(--menuitemtext);
159
- --blue: var(--menuitemtext);
158
+ @include mixins.takeover-color-vars(menuitem);
159
+ // --secondary: var(--menuitemtext);
160
+ // --blue: var(--menuitemtext);
160
161
  }
161
162
  @include mixins.add-hover-state {
162
163
  --menuitemface: var(--menuitemhighlightface,);
163
164
  --menuitemtext: var(--menuitemhighlighttext,);
164
165
 
165
- --secondary: var(--menuitemtext);
166
- --blue: var(--menuitemtext);
166
+ @include mixins.takeover-color-vars(menuitem);
167
+ // --secondary: var(--menuitemtext);
168
+ // --blue: var(--menuitemtext);
167
169
  }
168
170
  }
169
171
  > menu-view {
@@ -171,15 +173,17 @@
171
173
  --menuitemface: var(--menuitemhighlightface,);
172
174
  --menuitemtext: var(--menuitemhighlighttext,);
173
175
 
174
- --secondary: var(--menuitemtext);
175
- --blue: var(--menuitemtext);
176
+ @include mixins.takeover-color-vars(menuitem);
177
+ // --secondary: var(--menuitemtext);
178
+ // --blue: var(--menuitemtext);
176
179
  }
177
180
  @include mixins.add-hover-state('::part(menu-summary)') {
178
181
  --menuitemface: var(--menuitemhighlightface,);
179
182
  --menuitemtext: var(--menuitemhighlighttext,);
180
183
 
181
- --secondary: var(--menuitemtext);
182
- --blue: var(--menuitemtext);
184
+ @include mixins.takeover-color-vars(menuitem);
185
+ // --secondary: var(--menuitemtext);
186
+ // --blue: var(--menuitemtext);
183
187
  }
184
188
  }
185
189
  }
@@ -14,37 +14,37 @@ $picker-elses: (
14
14
  --picker--stack-grid-template-columns: minmax(0, 1fr), //auto minmax(0, 1fr),
15
15
  );
16
16
 
17
- @mixin make-button-affordance() {
18
- position: relative;
17
+ // @mixin make-button-affordance() {
18
+ // position: relative;
19
19
 
20
- grid-auto-flow: column;
21
- grid-template-columns: var(--picker-affordance-size) minmax(0, 1fr);
22
- column-gap: var(--picker-affordance-col-gap);
20
+ // grid-auto-flow: column;
21
+ // grid-template-columns: var(--picker-affordance-size) minmax(0, 1fr);
22
+ // column-gap: var(--picker-affordance-col-gap);
23
23
 
24
- @include mixins.make-marker-pseudos(vars.$picker-affordance, before);
24
+ // @include mixins.make-marker-pseudos(vars.$picker-affordance, before);
25
25
 
26
- &::before {
27
- display: grid;
26
+ // &::before {
27
+ // display: grid;
28
28
 
29
- block-size: var(--picker-affordance-size);
30
- inline-size: var(--picker-affordance-size);
29
+ // block-size: var(--picker-affordance-size);
30
+ // inline-size: var(--picker-affordance-size);
31
31
 
32
- background-color: var(--menuitemtext, var(--text));
32
+ // background-color: var(--menuitemtext, var(--text));
33
33
 
34
- transform: var(--tablecol--after-rotate,);
34
+ // transform: var(--tablecol--after-rotate,);
35
35
 
36
- @media (prefers-reduced-motion: no-preference) {
37
- transition: transform 100ms ease-out;
38
- will-change: transform;
39
- }
36
+ // @media (prefers-reduced-motion: no-preference) {
37
+ // transition: transform 100ms ease-out;
38
+ // will-change: transform;
39
+ // }
40
40
 
41
- opacity: 0;
42
- }
41
+ // opacity: 0;
42
+ // }
43
43
 
44
- &[aria-selected='true']::before {
45
- opacity: 1;
46
- }
47
- }
44
+ // &[aria-selected='true']::before {
45
+ // opacity: 1;
46
+ // }
47
+ // }
48
48
 
49
49
  @layer #{vars.$components-layer} {
50
50
  picker-view {
@@ -84,11 +84,11 @@ $picker-elses: (
84
84
  margin-inline-start: 2rem;
85
85
  }
86
86
  }
87
- :where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
88
- @container style(--picker-style: menu) {
89
- @include make-button-affordance;
90
- }
91
- }
87
+ // :where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
88
+ // @container style(--picker-style: menu) {
89
+ // @include make-button-affordance;
90
+ // }
91
+ // }
92
92
 
93
93
  // SECTION: ifs
94
94
  @supports (x: #{string.unquote('if(else:red)')}) {
@@ -112,9 +112,9 @@ $picker-elses: (
112
112
  margin-inline-start: 2rem;
113
113
  }
114
114
 
115
- :where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
116
- @include make-button-affordance;
117
- }
115
+ // :where(& menu-view > button, & menu-view > [is='disclosure-group'] > button, & menu-view > [is='disclosure-group'] > summary) {
116
+ // @include make-button-affordance;
117
+ // }
118
118
 
119
119
  @include mixins.write-props(map.get($picker-ifs, $v)); //@include set-picker-style($v);
120
120
  }
@@ -32,6 +32,7 @@
32
32
  &:after {
33
33
  display: none;
34
34
  }
35
+ --list--accessories-size: 0rem;
35
36
  --list--accessories-display: none;
36
37
  // background: red;
37
38
  grid-auto-flow: column;
@@ -51,7 +51,7 @@ $table-elses: (
51
51
  --list--accessories-display: grid,
52
52
  );
53
53
 
54
- @layer #{vars.$components-layer} {
54
+ @layer #{vars.$list-components-layer} {
55
55
  table-view {
56
56
  &:not(& &, list-view &, [is='form-view'] &) {
57
57
  @extend %list;
@@ -202,6 +202,18 @@
202
202
  border-radius: var(--#{$prefix}radiustl#{','}) var(--#{$prefix}radiustr#{','}) var(--#{$prefix}radiusbr#{','}) var(--#{$prefix}radiusbl#{','});
203
203
  }
204
204
 
205
+ @mixin takeover-color-vars($prefix) {
206
+ --secondary: var(--#{$prefix}text);
207
+ --blue: var(--#{$prefix}text);
208
+ --red: var(--#{$prefix}text);
209
+ --green: var(--#{$prefix}text);
210
+ --orange: var(--#{$prefix}text);
211
+
212
+ // NOTE: breaks list-item-tints
213
+ --accentColor: var(--#{$prefix}text);
214
+ --accentColorEffective: var(--#{$prefix}text);
215
+ }
216
+
205
217
  @mixin vt-toolbar-cell-offscreen-keyframe() {
206
218
  --toolbar-cell-scale: scale(var(--view-transition-toolbar-cell-offscreen-scale));
207
219
  --toolbar-cell-filter: blur(10px);
@@ -286,6 +298,25 @@
286
298
  }
287
299
  }
288
300
 
301
+ @mixin if-content-view-list {
302
+ @include if-2col-split-view-fits {
303
+ // is content-view!
304
+ navigation-split-view > scroll-view & {
305
+ @content;
306
+ }
307
+ // is content-view!
308
+ navigation-split-view:has(> [is='sidebar-view'])[preferred-compact-column='content']:not([column-visibility='double-column']) > body-view > scroll-view & {
309
+ @content;
310
+ }
311
+ }
312
+ // is content-view!
313
+ @include if-3col-split-view-fits {
314
+ navigation-split-view:has(> [is='sidebar-view']):not([column-visibility='double-column']) > body-view > scroll-view & {
315
+ @content;
316
+ }
317
+ }
318
+ }
319
+
289
320
  // Mixin for plain CSS (linear)
290
321
  @mixin write-props($props) {
291
322
  @each $prop, $val in $props {
@@ -1,7 +1,9 @@
1
1
  @use '../vars';
2
2
  @use '../mixins';
3
3
 
4
- @layer #{vars.$components-layer} {
4
+ $list-item-selector: ':not([slot], section-view, [is="disclosure-group"], picker-view, menu-view, menu-view *, whatever-name)';
5
+
6
+ @layer #{vars.$list-components-layer} {
5
7
  %list {
6
8
  :where(&) {
7
9
  background-color: var(--list--host-background-color,);
@@ -13,9 +15,9 @@
13
15
  }
14
16
 
15
17
  // componentize buttons
16
- > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
17
- section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
18
- [is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
18
+ > #{$list-item-selector},
19
+ section-view > #{$list-item-selector},
20
+ [is='disclosure-group'] > #{$list-item-selector} {
19
21
  // :where(&:is(summary:not([is='disclosure-group'] [is='disclosure-group'] summary))) {
20
22
  // box-shadow: inset 0 0 4px magenta;
21
23
  // }
@@ -76,18 +78,17 @@
76
78
  // }
77
79
  // }
78
80
 
79
- // SECTION: wire gaps
80
- :not([slot], section-view) ~ section-view {
81
- :where(&:not(menu-view *)) {
82
- padding-block-start: var(--list--section-gap,);
83
- }
84
- }
85
- section-view:not([slot]) ~ section-view {
81
+ // SECTION: wire gaps between
82
+ // NOTE: apply gap to top of sections when adjacent to any
83
+ // :not([slot], section-view) ~ section-view:not([slot]),
84
+ // section-view:not([slot]) ~ section-view:not([slot]) {
85
+ :not([slot]) ~ section-view:not([slot]) {
86
86
  :where(&:not(menu-view *)) {
87
87
  padding-block-start: var(--list--section-gap,);
88
88
  }
89
89
  }
90
- section-view:has(~ :not([slot], section-view)) {
90
+ // NOTE: apply to bottom of sections when they have non-section adjacents
91
+ section-view:not([slot]):has(~ :not([slot], section-view)) {
91
92
  :where(&:not(menu-view *)) {
92
93
  padding-block-end: var(--list--section-gap,);
93
94
  }
@@ -97,26 +98,29 @@
97
98
  // padding-bottom: calc(var(--list--section-gap, 0px) / 2);
98
99
  // }
99
100
  // }
100
- :not([slot], [is='disclosure-group']) ~ [is='disclosure-group'] {
101
+ // NOTE: apply gap to top of details when adjacent to any(except summary)
102
+ // :not([slot], [is='disclosure-group'], summary) ~ [is='disclosure-group']:not([slot]) {
103
+ :not([slot], summary) ~ [is='disclosure-group']:not([slot]) {
101
104
  :where(&:not(menu-view *)) {
102
105
  margin-block-start: var(--list--details-gap,);
103
106
  }
104
107
  }
105
- [is='disclosure-group']:not([slot]) ~ [is='disclosure-group'] {
106
- :where(&:not(menu-view *)) {
107
- margin-block-start: calc(var(--list--details-gap, 0px) / 2);
108
- }
109
- }
110
- [is='disclosure-group']:has(~ :not([slot], [is='disclosure-group'])) {
108
+ // [is='disclosure-group']:not([slot]) ~ [is='disclosure-group']:not([slot]) {
109
+ // :where(&:not(menu-view *)) {
110
+ // margin-block-start: calc(var(--list--details-gap, 0px) / 2);
111
+ // }
112
+ // }
113
+ // NOTE: apply to bottom of details when they have non-details adjacents
114
+ [is='disclosure-group']:not([slot]):has(~ :not([slot], [is='disclosure-group'])) {
111
115
  :where(&:not(menu-view *)) {
112
116
  margin-block-end: var(--list--details-gap,);
113
117
  }
114
118
  }
115
- [is='disclosure-group']:has(~ [is='disclosure-group']:not([slot])) {
116
- :where(&:not(menu-view *)) {
117
- margin-block-end: calc(var(--list--details-gap, 0px) / 2);
118
- }
119
- }
119
+ // [is='disclosure-group']:not([slot]):has(~ [is='disclosure-group']:not([slot])) {
120
+ // :where(&:not(menu-view *)) {
121
+ // margin-block-end: calc(var(--list--details-gap, 0px) / 2);
122
+ // }
123
+ // }
120
124
 
121
125
  // SECTION: wire paddings
122
126
  :where(&:not(menu-view *)) {
@@ -454,26 +458,11 @@
454
458
 
455
459
  // SECTION: add accessories
456
460
  // &:has(summary[marker-placement='leading']) {
457
- > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
458
- section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
459
- [is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
460
- // --itempadistart: 4rem;
461
-
462
- // --item-accessory-size: 24px;
463
-
464
- // --list--item-grid-template-columns: minmax(0, 1fr) 50px;
465
-
466
- // &:not(:is(button)) {
467
- // --list--accessories-display: none;
468
- // // --list--accessories-padding-inline-end: 24px;
469
- // }
470
-
471
- // &:is(button) {
472
- // position: relative;
473
- // display: grid;
474
- // grid-template-columns: minmax(0, 1fr) 24px;
475
-
476
- &:is(button) {
461
+ > #{$list-item-selector},
462
+ section-view > #{$list-item-selector},
463
+ [is='disclosure-group'] > #{$list-item-selector} {
464
+ // NOTE: drill-in chevron show up only on nav-link buttons. Paddings and all other props have already been taken over!
465
+ &:is(navigation-split-view button[is='navigation-link'], navigation-stack button[is='navigation-link']) {
477
466
  :where(&) {
478
467
  position: relative;
479
468
 
@@ -505,6 +494,31 @@
505
494
  // }
506
495
  // }
507
496
 
497
+ // SECTION: add tints
498
+ > #{$list-item-selector},
499
+ section-view > #{$list-item-selector},
500
+ [is='disclosure-group'] > #{$list-item-selector} {
501
+ // NOTE: drill-in chevron show up only on nav-link buttons. Paddings and all other props have already been taken over!
502
+ // &:is(button:not([is='navigation-link'])) {
503
+ // :where(&) {
504
+ // --itemtext: blue;
505
+ // }
506
+ // }
507
+ &:is(label-view[list-item-tint]) {
508
+ :where(&[list-item-tint] > [slot='image']) {
509
+ color: var(--accentColor);
510
+ }
511
+ }
512
+ // &:is(button[list-item-tint='red']) {
513
+ // :where(&) {
514
+ // --itemtext: red;
515
+
516
+ // --insetgroupedlist-highlighteditem-background-color:red;
517
+ // --insetgroupedlist-highlighteditem-color:red;
518
+ // }
519
+ // }
520
+ }
521
+
508
522
  // // SECTION: add searchable
509
523
  // > [slot='searchable'] {
510
524
  // :where(&) {
@@ -521,17 +535,20 @@
521
535
  @layer #{vars.$colors-layer} {
522
536
  // componentize
523
537
  %list {
524
- > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
525
- section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
526
- [is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
538
+ > #{$list-item-selector},
539
+ section-view > #{$list-item-selector},
540
+ [is='disclosure-group'] > #{$list-item-selector} {
527
541
  @include mixins.add-focus-visible-state {
528
542
  --itemface: var(--itemhighlightface,);
529
543
  --itemtext: var(--itemhighlighttext,);
530
544
 
531
545
  --list--separator-background-color: var(--list--highlighteditem-separator-background-color,);
532
546
 
533
- --secondary: var(--itemtext);
534
- --blue: var(--itemtext);
547
+ > * {
548
+ @include mixins.takeover-color-vars(item);
549
+ // --secondary: var(--itemtext);
550
+ // --blue: var(--itemtext);
551
+ }
535
552
  }
536
553
  }
537
554
  }
@@ -540,9 +557,9 @@
540
557
  @layer #{vars.$ui-layer} {
541
558
  // componentize
542
559
  %list {
543
- > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
544
- section-view > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name),
545
- [is='disclosure-group'] > :not([slot], section-view, [is='disclosure-group'], picker-view, menu-view, menu-view *, whatever-name) {
560
+ > #{$list-item-selector},
561
+ section-view > #{$list-item-selector},
562
+ [is='disclosure-group'] > #{$list-item-selector} {
546
563
  // :where(&:is(button)) {
547
564
  @include mixins.add-jsactive-state {
548
565
  --itemface: var(--itemactiveface,);
@@ -550,8 +567,11 @@
550
567
 
551
568
  --list--separator-background-color: var(--list--highlighteditem-separator-background-color,);
552
569
 
553
- --secondary: var(--itemtext);
554
- --blue: var(--itemtext);
570
+ > * {
571
+ @include mixins.takeover-color-vars(item);
572
+ }
573
+ // --secondary: var(--itemtext);
574
+ // --blue: var(--itemtext);
555
575
  }
556
576
 
557
577
  &[aria-selected='true'] {
@@ -561,8 +581,11 @@
561
581
 
562
582
  --list--separator-background-color: var(--list--highlighteditem-separator-background-color,);
563
583
 
564
- --secondary: var(--itemtext);
565
- --blue: var(--itemtext);
584
+ > * {
585
+ @include mixins.takeover-color-vars(item);
586
+ // --secondary: var(--itemtext);
587
+ // --blue: var(--itemtext);
588
+ }
566
589
  }
567
590
  }
568
591
  // }
@@ -37,55 +37,23 @@
37
37
  color: var(--blue2);
38
38
  }
39
39
 
40
- [tint='gray'] {
41
- :where(&) {
42
- --accentColorEffective: var(--gray);
43
- --accentColorEffective4: var(--gray4);
44
-
45
- --accentColor: var(--gray);
46
- --accentColor2: var(--gray2);
47
- --accentColor3: var(--gray3);
48
- --accentColor4: var(--gray4);
49
- --accentColor5: var(--gray5);
50
- }
51
-
52
- // :where(&[is='bordered-button']) {
53
- // // --accentEmphasis: light-dark(color-mix(in oklch, var(--gray) 50%, var(--black)), color-mix(in oklch, var(--gray) 50%, var(--white)));
54
- // --accentSubtle: var(--gray4);
55
- // }
56
- }
57
-
58
- [tint='blue'] {
59
- :where(&) {
60
- --accentColorEffective: var(--blue);
61
- --accentColorEffective4: var(--blue4);
62
-
63
- --accentColor: var(--blue);
64
- --accentColor2: var(--blue2);
65
- --accentColor3: var(--blue3);
66
- --accentColor4: var(--blue4);
67
- --accentColor5: var(--blue5);
68
- }
69
-
70
- // :where(&[is='bordered-button']) {
71
- // --accentSubtle: var(--blue4);
72
- // }
73
- }
74
-
75
- [tint='red'] {
76
- :where(&) {
77
- --accentColorEffective: var(--red);
78
- --accentColorEffective4: var(--red4);
40
+ @each $tint in gray, blue, red, green, orange {
41
+ [tint='"" + $tint'],
42
+ [list-item-tint='"" + $tint'] {
43
+ :where(&) {
44
+ --accentColorEffective: var(--#{$tint});
45
+ --accentColorEffective4: var(--#{$tint}4);
46
+
47
+ --accentColor: var(--#{$tint});
48
+ --accentColor2: var(--#{$tint}2);
49
+ --accentColor3: var(--#{$tint}3);
50
+ --accentColor4: var(--#{$tint}4);
51
+ --accentColor5: var(--#{$tint}5);
52
+ }
79
53
 
80
- --accentColor: var(--red);
81
- --accentColor2: var(--red2);
82
- --accentColor3: var(--red3);
83
- --accentColor4: var(--red4);
84
- --accentColor5: var(--red5);
54
+ // :where(&[is='bordered-button']) {
55
+ // --accentSubtle: var(--red4);
56
+ // }
85
57
  }
86
-
87
- // :where(&[is='bordered-button']) {
88
- // --accentSubtle: var(--red4);
89
- // }
90
58
  }
91
59
  }