@volverjs/style 0.1.24-beta.1 → 0.1.24-beta.3

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 (112) hide show
  1. package/dist/base.css +1 -1
  2. package/dist/components/vv-accordion-group.css +1 -1
  3. package/dist/components/vv-accordion.css +1 -1
  4. package/dist/components/vv-alert-group.css +1 -1
  5. package/dist/components/vv-alert.css +1 -1
  6. package/dist/components/vv-avatar-group.css +1 -1
  7. package/dist/components/vv-avatar.css +1 -1
  8. package/dist/components/vv-badge.css +1 -1
  9. package/dist/components/vv-breadcrumb.css +1 -1
  10. package/dist/components/vv-button-group.css +1 -1
  11. package/dist/components/vv-button.css +1 -1
  12. package/dist/components/vv-card.css +1 -1
  13. package/dist/components/vv-checkbox-group.css +1 -1
  14. package/dist/components/vv-checkbox.css +1 -1
  15. package/dist/components/vv-dialog.css +1 -1
  16. package/dist/components/vv-dropdown-action.css +1 -1
  17. package/dist/components/vv-dropdown-optgroup.css +1 -1
  18. package/dist/components/vv-dropdown-option.css +1 -1
  19. package/dist/components/vv-dropdown.css +1 -1
  20. package/dist/components/vv-input-file.css +1 -1
  21. package/dist/components/vv-input-text.css +1 -1
  22. package/dist/components/vv-nav.css +1 -1
  23. package/dist/components/vv-progress.css +1 -1
  24. package/dist/components/vv-radio-group.css +1 -1
  25. package/dist/components/vv-radio.css +1 -1
  26. package/dist/components/vv-select.css +1 -1
  27. package/dist/components/vv-skeleton.css +1 -1
  28. package/dist/components/vv-tab.css +1 -1
  29. package/dist/components/vv-table.css +1 -1
  30. package/dist/components/vv-text.css +1 -1
  31. package/dist/components/vv-textarea.css +1 -1
  32. package/dist/components/vv-tooltip.css +1 -1
  33. package/dist/components.css +1 -1
  34. package/dist/export.css +1 -1
  35. package/dist/props/background.css +1 -1
  36. package/dist/props/borders.css +1 -1
  37. package/dist/props/breakpoints.css +1 -1
  38. package/dist/props/colors.css +1 -1
  39. package/dist/props/effects.css +1 -1
  40. package/dist/props/filters.css +1 -1
  41. package/dist/props/input.css +1 -1
  42. package/dist/props/layout.css +1 -1
  43. package/dist/props/media.css +1 -0
  44. package/dist/props/sizing.css +1 -1
  45. package/dist/props/spacing.css +1 -1
  46. package/dist/props/transitions.css +1 -1
  47. package/dist/props/typography.css +1 -1
  48. package/dist/props.css +1 -1
  49. package/dist/reset.css +1 -1
  50. package/dist/themes/dark/components.css +1 -1
  51. package/dist/themes/dark/props.css +1 -1
  52. package/dist/themes/dark/volver.css +1 -1
  53. package/dist/utilities/backgrounds.css +1 -1
  54. package/dist/utilities/borders.css +1 -1
  55. package/dist/utilities/colors.css +1 -1
  56. package/dist/utilities/effects.css +1 -1
  57. package/dist/utilities/filters.css +1 -1
  58. package/dist/utilities/flexbox.css +1 -1
  59. package/dist/utilities/grid.css +1 -1
  60. package/dist/utilities/interactivity.css +1 -1
  61. package/dist/utilities/layout.css +1 -1
  62. package/dist/utilities/sizing.css +1 -1
  63. package/dist/utilities/spacing.css +1 -1
  64. package/dist/utilities/transforms.css +1 -1
  65. package/dist/utilities/typography.css +1 -1
  66. package/dist/utilities.css +1 -1
  67. package/dist/volver.css +1 -1
  68. package/package.json +24 -24
  69. package/src/components/vv-accordion-group.scss +1 -1
  70. package/src/components/vv-accordion.scss +1 -1
  71. package/src/components/vv-alert-group.scss +1 -1
  72. package/src/components/vv-alert.scss +1 -1
  73. package/src/components/vv-avatar-group.scss +1 -1
  74. package/src/components/vv-avatar.scss +1 -1
  75. package/src/components/vv-badge.scss +1 -1
  76. package/src/components/vv-breadcrumb.scss +1 -1
  77. package/src/components/vv-button-group.scss +1 -1
  78. package/src/components/vv-button.scss +2 -2
  79. package/src/components/vv-card.scss +1 -1
  80. package/src/components/vv-checkbox-group.scss +1 -1
  81. package/src/components/vv-checkbox.scss +1 -1
  82. package/src/components/vv-dialog.scss +1 -1
  83. package/src/components/vv-dropdown-action.scss +1 -1
  84. package/src/components/vv-dropdown-optgroup.scss +1 -1
  85. package/src/components/vv-dropdown-option.scss +1 -1
  86. package/src/components/vv-dropdown.scss +1 -1
  87. package/src/components/vv-input-file.scss +1 -1
  88. package/src/components/vv-input-text.scss +1 -1
  89. package/src/components/vv-nav.scss +1 -1
  90. package/src/components/vv-progress.scss +1 -1
  91. package/src/components/vv-radio-group.scss +1 -1
  92. package/src/components/vv-radio.scss +13 -14
  93. package/src/components/vv-select.scss +1 -1
  94. package/src/components/vv-skeleton.scss +1 -1
  95. package/src/components/vv-tab.scss +1 -1
  96. package/src/components/vv-table.scss +1 -1
  97. package/src/components/vv-text.scss +1 -1
  98. package/src/components/vv-textarea.scss +1 -1
  99. package/src/components/vv-tooltip.scss +1 -1
  100. package/src/settings/components/_vv-accordion.scss +2 -2
  101. package/src/settings/components/_vv-dialog.scss +1 -0
  102. package/src/themes/dark/components/_vv-alert.scss +2 -1
  103. package/src/themes/dark/components/_vv-avatar.scss +2 -1
  104. package/src/themes/dark/components/_vv-badge.scss +2 -1
  105. package/src/themes/dark/components/_vv-button.scss +2 -1
  106. package/src/themes/dark/components/_vv-dropdown-action.scss +2 -1
  107. package/src/themes/dark/components/_vv-dropdown-option.scss +2 -1
  108. package/src/themes/dark/components/_vv-nav.scss +2 -1
  109. package/src/themes/dark/components/_vv-select.scss +2 -1
  110. package/src/tools/mixin-modules/_attrs.scss +5 -5
  111. package/src/tools/mixin-modules/_bem.scss +32 -32
  112. package/src/tools/mixin-modules/_theme.scss +107 -34
@@ -34,7 +34,7 @@ $-valid-states: (
34
34
  // @param {String} $states-key - Key for states in map
35
35
  // @param {String} $breakpoints-key - Key for breakpoints in map
36
36
  // @param {String} $transitions-key - Key for transitions in map
37
- // @param {Bool} $props - Whether to use CSS custom properties
37
+ // @param {Bool} $use-custom-props - Whether to use CSS custom properties
38
38
  // @param {Bool} $zero-specificity - Whether to wrap in :where()
39
39
  // @param {Bool} $custom-* - Flags to skip specific parts
40
40
  // @param {Map} $bps - Breakpoints map
@@ -46,7 +46,7 @@ $-valid-states: (
46
46
  $states-key: 'state',
47
47
  $breakpoints-key: 'breakpoint',
48
48
  $transitions-key: 'transition',
49
- $props: true,
49
+ $use-custom-props: true,
50
50
  $zero-specificity: true,
51
51
  $custom-props: false,
52
52
  $custom-block: false,
@@ -62,7 +62,7 @@ $-valid-states: (
62
62
 
63
63
  // custom props
64
64
  @if not $custom-props {
65
- @if $props {
65
+ @if $use-custom-props {
66
66
  :where(:host, :root, .theme) {
67
67
  @include spread-map-into-props(
68
68
  $map: $map,
@@ -79,7 +79,7 @@ $-valid-states: (
79
79
  @include spread-map-into-attrs(
80
80
  $map: $map,
81
81
  $prefix: $block,
82
- $props: $props
82
+ $use-custom-props: $use-custom-props
83
83
  );
84
84
 
85
85
  @content;
@@ -100,7 +100,7 @@ $-valid-states: (
100
100
  $prefix: $block,
101
101
  $key: $elements-key,
102
102
  $block: $selector,
103
- $props: $props,
103
+ $use-custom-props: $use-custom-props,
104
104
  $zero-specificity: $zero-specificity,
105
105
  $bps: $bps
106
106
  );
@@ -115,7 +115,7 @@ $-valid-states: (
115
115
  $prefix: $block,
116
116
  $key: $states-key,
117
117
  $block: $selector,
118
- $props: $props,
118
+ $use-custom-props: $use-custom-props,
119
119
  $zero-specificity: $zero-specificity,
120
120
  $bps: $bps
121
121
  );
@@ -130,7 +130,7 @@ $-valid-states: (
130
130
  $prefix: $block,
131
131
  $key: $modifiers-key,
132
132
  $block: $selector,
133
- $props: $props,
133
+ $use-custom-props: $use-custom-props,
134
134
  $zero-specificity: $zero-specificity,
135
135
  $bps: $bps
136
136
  );
@@ -145,7 +145,7 @@ $-valid-states: (
145
145
  $prefix: $block,
146
146
  $key: $transitions-key,
147
147
  $block: $selector,
148
- $props: $props,
148
+ $use-custom-props: $use-custom-props,
149
149
  $zero-specificity: $zero-specificity,
150
150
  $bps: $bps
151
151
  );
@@ -160,7 +160,7 @@ $-valid-states: (
160
160
  $prefix: $block,
161
161
  $key: $breakpoints-key,
162
162
  $block: $selector,
163
- $props: $props,
163
+ $use-custom-props: $use-custom-props,
164
164
  $zero-specificity: $zero-specificity,
165
165
  $bps: $bps
166
166
  );
@@ -180,7 +180,7 @@ $-valid-states: (
180
180
  $key: 'modifier',
181
181
  $block: null,
182
182
  $modifier: '',
183
- $props: true,
183
+ $use-custom-props: true,
184
184
  $zero-specificity: true,
185
185
  $bps: (xxs: 0)
186
186
  ) {
@@ -204,7 +204,7 @@ $-valid-states: (
204
204
  $variant: #{$key}-#{$item},
205
205
  $deep: true,
206
206
  $ignore: ('state', 'breakpoint', 'element', 'modifier'),
207
- $props: $props
207
+ $use-custom-props: $use-custom-props
208
208
  );
209
209
  }
210
210
 
@@ -224,7 +224,7 @@ $-valid-states: (
224
224
  $key: 'element',
225
225
  $block: $block,
226
226
  $modifier: $modifier + $selector,
227
- $props: $props,
227
+ $use-custom-props: $use-custom-props,
228
228
  $zero-specificity: $zero-specificity,
229
229
  $bps: $bps
230
230
  );
@@ -239,7 +239,7 @@ $-valid-states: (
239
239
  $key: 'state',
240
240
  $block: $block,
241
241
  $modifier: $modifier + $selector,
242
- $props: $props,
242
+ $use-custom-props: $use-custom-props,
243
243
  $zero-specificity: $zero-specificity,
244
244
  $bps: $bps
245
245
  );
@@ -253,7 +253,7 @@ $-valid-states: (
253
253
  $key: 'breakpoint',
254
254
  $block: $block,
255
255
  $modifier: $modifier + $selector,
256
- $props: $props,
256
+ $use-custom-props: $use-custom-props,
257
257
  $zero-specificity: $zero-specificity,
258
258
  $bps: $bps
259
259
  );
@@ -268,7 +268,7 @@ $-valid-states: (
268
268
  $key: 'modifier',
269
269
  $block: $block,
270
270
  $modifier: $modifier + $selector,
271
- $props: $props,
271
+ $use-custom-props: $use-custom-props,
272
272
  $zero-specificity: $zero-specificity,
273
273
  $bps: $bps
274
274
  );
@@ -288,7 +288,7 @@ $-valid-states: (
288
288
  $key: 'element',
289
289
  $block: null,
290
290
  $modifier: null,
291
- $props: true,
291
+ $use-custom-props: true,
292
292
  $zero-specificity: true,
293
293
  $bps: (xxs: 0)
294
294
  ) {
@@ -349,7 +349,7 @@ $-valid-states: (
349
349
  $variant: #{$key}-#{$element},
350
350
  $deep: true,
351
351
  $ignore: ('state', 'breakpoint'),
352
- $props: $props
352
+ $use-custom-props: $use-custom-props
353
353
  );
354
354
  }
355
355
 
@@ -368,7 +368,7 @@ $-valid-states: (
368
368
  $key: 'state',
369
369
  $block: $selector,
370
370
  $alias: $alias,
371
- $props: $props,
371
+ $use-custom-props: $use-custom-props,
372
372
  $zero-specificity: $zero-specificity,
373
373
  $bps: $bps
374
374
  );
@@ -381,7 +381,7 @@ $-valid-states: (
381
381
  $prefix: #{$prefix}-#{$key}-#{$element},
382
382
  $key: 'breakpoint',
383
383
  $block: list-to-string(($selector, $alias)),
384
- $props: $props,
384
+ $use-custom-props: $use-custom-props,
385
385
  $zero-specificity: $zero-specificity,
386
386
  $bps: $bps
387
387
  );
@@ -402,7 +402,7 @@ $-valid-states: (
402
402
  $block: null,
403
403
  $modifier: '',
404
404
  $alias: null,
405
- $props: true,
405
+ $use-custom-props: true,
406
406
  $zero-specificity: true,
407
407
  $bps: (xxs: 0)
408
408
  ) {
@@ -449,7 +449,7 @@ $-valid-states: (
449
449
  $variant: #{$key}-#{$state},
450
450
  $ignore: ('element'),
451
451
  $deep: true,
452
- $props: $props
452
+ $use-custom-props: $use-custom-props
453
453
  );
454
454
  }
455
455
 
@@ -466,7 +466,7 @@ $-valid-states: (
466
466
  $key: 'element',
467
467
  $block: $block,
468
468
  $modifier: $selector,
469
- $props: $props,
469
+ $use-custom-props: $use-custom-props,
470
470
  $zero-specificity: $zero-specificity,
471
471
  $bps: $bps
472
472
  );
@@ -481,7 +481,7 @@ $-valid-states: (
481
481
  $key: 'breakpoint',
482
482
  $block: $block,
483
483
  $modifier: $selector,
484
- $props: $props,
484
+ $use-custom-props: $use-custom-props,
485
485
  $zero-specificity: $zero-specificity,
486
486
  $bps: $bps
487
487
  );
@@ -584,7 +584,7 @@ $-valid-states: (
584
584
  $key: 'breakpoint',
585
585
  $block: null,
586
586
  $modifier: '',
587
- $props: true,
587
+ $use-custom-props: true,
588
588
  $zero-specificity: true,
589
589
  $bps: (xxs: 0)
590
590
  ) {
@@ -612,7 +612,7 @@ $-valid-states: (
612
612
  $prefix: $prefix,
613
613
  $variant: #{$key}-#{$breakpoint},
614
614
  $deep: true,
615
- $props: $props
615
+ $use-custom-props: $use-custom-props
616
616
  );
617
617
  }
618
618
  }
@@ -627,7 +627,7 @@ $-valid-states: (
627
627
  $prefix: $prefix,
628
628
  $variant: #{$key}-#{$breakpoint},
629
629
  $deep: true,
630
- $props: $props
630
+ $use-custom-props: $use-custom-props
631
631
  );
632
632
  }
633
633
  }
@@ -642,7 +642,7 @@ $-valid-states: (
642
642
  $prefix: $prefix,
643
643
  $variant: #{$key}-#{$breakpoint},
644
644
  $deep: true,
645
- $props: $props
645
+ $use-custom-props: $use-custom-props
646
646
  );
647
647
  }
648
648
  }
@@ -657,7 +657,7 @@ $-valid-states: (
657
657
  $prefix: $prefix,
658
658
  $variant: #{$key}-#{$breakpoint},
659
659
  $deep: true,
660
- $props: $props
660
+ $use-custom-props: $use-custom-props
661
661
  );
662
662
  }
663
663
  }
@@ -675,7 +675,7 @@ $-valid-states: (
675
675
  $prefix: '',
676
676
  $key: 'transition',
677
677
  $block: null,
678
- $props: true,
678
+ $use-custom-props: true,
679
679
  $zero-specificity: true,
680
680
  $bps: (xxs: 0)
681
681
  ) {
@@ -710,7 +710,7 @@ $-valid-states: (
710
710
  $variant: #{$key}-#{$transition}-#{$state},
711
711
  $deep: true,
712
712
  $ignore: ('element'),
713
- $props: $props,
713
+ $use-custom-props: $use-custom-props,
714
714
  $bps: $bps
715
715
  );
716
716
  }
@@ -724,7 +724,7 @@ $-valid-states: (
724
724
  $key: 'element',
725
725
  $block: $block,
726
726
  $modifier: $selector,
727
- $props: $props,
727
+ $use-custom-props: $use-custom-props,
728
728
  $zero-specificity: $zero-specificity,
729
729
  $bps: $bps
730
730
  );
@@ -739,7 +739,7 @@ $-valid-states: (
739
739
  $key: 'breakpoint',
740
740
  $block: $block,
741
741
  $modifier: $selector,
742
- $props: $props,
742
+ $use-custom-props: $use-custom-props,
743
743
  $zero-specificity: $zero-specificity,
744
744
  $bps: $bps
745
745
  );
@@ -3,6 +3,7 @@
3
3
  @use 'sass:meta';
4
4
  @use 'props' as *;
5
5
  @use 'attrs' as *;
6
+ @use 'helpers' as *;
6
7
 
7
8
  // ============================================
8
9
  // Theme component utilities
@@ -54,6 +55,7 @@
54
55
  // @param {Bool} $use-custom-props - Whether to use CSS custom properties
55
56
  // @param {Bool} $generate-light-reset - Auto-generate light reset from base-map (default: true)
56
57
  // @param {String} $light-reset-selector - Selector for light reset (default: '.theme.theme--light')
58
+ // @param {Bool} $zero-specificity - Whether to wrap selectors in :where()
57
59
  @mixin spread-theme-component(
58
60
  $base-map,
59
61
  $theme-map,
@@ -61,7 +63,8 @@
61
63
  $bps: (xxs: 0),
62
64
  $use-custom-props: true,
63
65
  $generate-light-reset: true,
64
- $light-reset-selector: '.theme.theme--light'
66
+ $light-reset-selector: '.theme.theme--light',
67
+ $zero-specificity: true
65
68
  ) {
66
69
  // Calculate light reset map from base-map if needed
67
70
  $light-reset-map: null;
@@ -91,11 +94,11 @@
91
94
  $selector: '.' + $component-name;
92
95
 
93
96
  // Block styles (base attributes, ignoring nested structures)
94
- #{$selector} {
97
+ @include wrap-with-where($selector: $selector, $enabled: $zero-specificity) {
95
98
  @include spread-map-into-attrs(
96
99
  $map: $theme-map,
97
100
  $prefix: $component-name,
98
- $props: false,
101
+ $use-custom-props: false,
99
102
  $ignore: (modifier, element, state, breakpoint, transition)
100
103
  );
101
104
  }
@@ -106,7 +109,8 @@
106
109
  $map: map.get($theme-map, 'modifier'),
107
110
  $prefix: $component-name,
108
111
  $block: $selector,
109
- $bps: $bps
112
+ $bps: $bps,
113
+ $zero-specificity: $zero-specificity
110
114
  );
111
115
  }
112
116
 
@@ -116,7 +120,8 @@
116
120
  $map: map.get($theme-map, 'element'),
117
121
  $prefix: $component-name,
118
122
  $block: $selector,
119
- $bps: $bps
123
+ $bps: $bps,
124
+ $zero-specificity: $zero-specificity
120
125
  );
121
126
  }
122
127
 
@@ -127,7 +132,8 @@
127
132
  $prefix: $component-name,
128
133
  $block: $selector,
129
134
  $parent-selector: $selector,
130
- $bps: $bps
135
+ $bps: $bps,
136
+ $zero-specificity: $zero-specificity
131
137
  );
132
138
  }
133
139
 
@@ -138,7 +144,8 @@
138
144
  $map: $light-reset-map,
139
145
  $prefix: $component-name,
140
146
  $block: $selector,
141
- $bps: $bps
147
+ $bps: $bps,
148
+ $zero-specificity: $zero-specificity
142
149
  );
143
150
  }
144
151
  }
@@ -146,13 +153,13 @@
146
153
  }
147
154
 
148
155
  // Helper to generate all theme rules (block, modifiers, elements, states)
149
- @mixin _theme-generate-all($map, $prefix, $block, $bps) {
156
+ @mixin _theme-generate-all($map, $prefix, $block, $bps, $zero-specificity: true) {
150
157
  // Block styles
151
- #{$block} {
158
+ @include wrap-with-where($selector: $block, $enabled: $zero-specificity) {
152
159
  @include spread-map-into-attrs(
153
160
  $map: $map,
154
161
  $prefix: $prefix,
155
- $props: false,
162
+ $use-custom-props: false,
156
163
  $ignore: (modifier, element, state, breakpoint, transition)
157
164
  );
158
165
  }
@@ -163,7 +170,8 @@
163
170
  $map: map.get($map, 'modifier'),
164
171
  $prefix: $prefix,
165
172
  $block: $block,
166
- $bps: $bps
173
+ $bps: $bps,
174
+ $zero-specificity: $zero-specificity
167
175
  );
168
176
  }
169
177
 
@@ -173,7 +181,8 @@
173
181
  $map: map.get($map, 'element'),
174
182
  $prefix: $prefix,
175
183
  $block: $block,
176
- $bps: $bps
184
+ $bps: $bps,
185
+ $zero-specificity: $zero-specificity
177
186
  );
178
187
  }
179
188
 
@@ -184,7 +193,8 @@
184
193
  $prefix: $prefix,
185
194
  $block: $block,
186
195
  $parent-selector: $block,
187
- $bps: $bps
196
+ $bps: $bps,
197
+ $zero-specificity: $zero-specificity
188
198
  );
189
199
  }
190
200
  }
@@ -194,7 +204,7 @@
194
204
  // ============================================
195
205
 
196
206
  // Spread modifiers for theme (no @extend)
197
- @mixin _theme-spread-modifiers($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0)) {
207
+ @mixin _theme-spread-modifiers($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0), $zero-specificity: true) {
198
208
  @each $mod-name, $mod-value in $map {
199
209
  $mod-selector: '#{$block}#{$block}--#{$mod-name}';
200
210
 
@@ -203,11 +213,11 @@
203
213
  }
204
214
 
205
215
  // Modifier base styles
206
- #{$mod-selector} {
216
+ @include wrap-with-where($selector: $mod-selector, $enabled: $zero-specificity) {
207
217
  @include spread-map-into-attrs(
208
218
  $map: $mod-value,
209
219
  $prefix: $prefix,
210
- $props: false,
220
+ $use-custom-props: false,
211
221
  $ignore: (modifier, element, state, breakpoint)
212
222
  );
213
223
  }
@@ -219,7 +229,8 @@
219
229
  $prefix: $prefix,
220
230
  $block: $block,
221
231
  $parent-selector: $mod-selector,
222
- $bps: $bps
232
+ $bps: $bps,
233
+ $zero-specificity: $zero-specificity
223
234
  );
224
235
  }
225
236
 
@@ -230,7 +241,8 @@
230
241
  $prefix: $prefix,
231
242
  $block: $block,
232
243
  $parent-selector: $mod-selector,
233
- $bps: $bps
244
+ $bps: $bps,
245
+ $zero-specificity: $zero-specificity
234
246
  );
235
247
  }
236
248
 
@@ -241,14 +253,15 @@
241
253
  $prefix: $prefix,
242
254
  $block: $block,
243
255
  $parent-selector: $mod-selector,
244
- $bps: $bps
256
+ $bps: $bps,
257
+ $zero-specificity: $zero-specificity
245
258
  );
246
259
  }
247
260
  }
248
261
  }
249
262
 
250
263
  // Spread elements for theme (no @extend)
251
- @mixin _theme-spread-elements($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0)) {
264
+ @mixin _theme-spread-elements($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0), $zero-specificity: true) {
252
265
  @each $el-name, $el-value in $map {
253
266
  $el-selector: '#{$block}__#{$el-name}';
254
267
  $full-selector: $el-selector;
@@ -258,11 +271,11 @@
258
271
  }
259
272
 
260
273
  // Element base styles
261
- #{$full-selector} {
274
+ @include wrap-with-where($selector: $full-selector, $enabled: $zero-specificity) {
262
275
  @include spread-map-into-attrs(
263
276
  $map: $el-value,
264
277
  $prefix: $prefix,
265
- $props: false,
278
+ $use-custom-props: false,
266
279
  $ignore: (modifier, element, state, breakpoint)
267
280
  );
268
281
  }
@@ -274,14 +287,15 @@
274
287
  $prefix: $prefix,
275
288
  $block: $el-selector,
276
289
  $parent-selector: $parent-selector,
277
- $bps: $bps
290
+ $bps: $bps,
291
+ $zero-specificity: $zero-specificity
278
292
  );
279
293
  }
280
294
  }
281
295
  }
282
296
 
283
297
  // Spread states for theme (no @extend)
284
- @mixin _theme-spread-states($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0)) {
298
+ @mixin _theme-spread-states($map, $prefix, $block, $parent-selector: null, $bps: (xxs: 0), $zero-specificity: true) {
285
299
  $state-list: (
286
300
  active, focus, hover, focus-within, target, visited, focus-visible,
287
301
  disabled, checked, checked-within, multiple, selected, readonly,
@@ -298,42 +312,100 @@
298
312
  }
299
313
 
300
314
  // BEM modifier style: .block--state
301
- #{$base}#{$block}--#{$state-name},
302
315
  // Class style: .block.state
303
- #{$base}.#{$state-name} {
316
+ $state-selectors: (
317
+ '#{$base}#{$block}--#{$state-name}',
318
+ '#{$base}.#{$state-name}'
319
+ );
320
+
321
+ @include wrap-with-where($selector: $state-selectors, $enabled: $zero-specificity) {
304
322
  @include spread-map-into-attrs(
305
323
  $map: $state-value,
306
324
  $prefix: $prefix,
307
- $props: false,
325
+ $use-custom-props: false,
308
326
  $ignore: (modifier, element, state, breakpoint)
309
327
  );
310
328
  }
311
329
 
312
330
  // Pseudo-class style based on state type
313
331
  @if $state-name == 'disabled' or $state-name == 'readonly' or $state-name == 'multiple' {
314
- #{$base}[#{$state-name}] {
332
+ @include wrap-with-where($selector: '#{$base}[#{$state-name}]', $enabled: $zero-specificity) {
315
333
  @include spread-map-into-attrs(
316
334
  $map: $state-value,
317
335
  $prefix: $prefix,
318
- $props: false,
336
+ $use-custom-props: false,
319
337
  $ignore: (modifier, element, state, breakpoint)
320
338
  );
321
339
  }
322
340
  } @else if $state-name == 'focus-visible' {
323
- #{$base}:not(:active):not([disabled]):not([tabindex="-1"]):not([aria-disabled="true"]):#{$state-name} {
341
+ @include wrap-with-where($selector: '#{$base}:not(:active):not([disabled]):not([tabindex="-1"]):not([aria-disabled="true"]):#{$state-name}', $enabled: $zero-specificity) {
342
+ @include spread-map-into-attrs(
343
+ $map: $state-value,
344
+ $prefix: $prefix,
345
+ $use-custom-props: false,
346
+ $ignore: (modifier, element, state, breakpoint)
347
+ );
348
+ }
349
+ } @else if $state-name == 'selected' {
350
+ @include wrap-with-where($selector: '#{$base}[aria-selected="true"]', $enabled: $zero-specificity) {
351
+ @include spread-map-into-attrs(
352
+ $map: $state-value,
353
+ $prefix: $prefix,
354
+ $use-custom-props: false,
355
+ $ignore: (modifier, element, state, breakpoint)
356
+ );
357
+ }
358
+ } @else if $state-name == 'pressed' {
359
+ @include wrap-with-where($selector: '#{$base}[aria-pressed="true"]', $enabled: $zero-specificity) {
360
+ @include spread-map-into-attrs(
361
+ $map: $state-value,
362
+ $prefix: $prefix,
363
+ $use-custom-props: false,
364
+ $ignore: (modifier, element, state, breakpoint)
365
+ );
366
+ }
367
+ } @else if $state-name == 'checked-within' {
368
+ @include wrap-with-where($selector: '#{$base}:has(input:checked)', $enabled: $zero-specificity) {
369
+ @include spread-map-into-attrs(
370
+ $map: $state-value,
371
+ $prefix: $prefix,
372
+ $use-custom-props: false,
373
+ $ignore: (modifier, element, state, breakpoint)
374
+ );
375
+ }
376
+ } @else if $state-name == 'open' {
377
+ @include wrap-with-where($selector: '#{$base}[open]', $enabled: $zero-specificity) {
378
+ @include spread-map-into-attrs(
379
+ $map: $state-value,
380
+ $prefix: $prefix,
381
+ $use-custom-props: false,
382
+ $ignore: (modifier, element, state, breakpoint)
383
+ );
384
+ }
385
+ } @else if $state-name == 'close' {
386
+ @include wrap-with-where($selector: '#{$base}:not([open])', $enabled: $zero-specificity) {
387
+ @include spread-map-into-attrs(
388
+ $map: $state-value,
389
+ $prefix: $prefix,
390
+ $use-custom-props: false,
391
+ $ignore: (modifier, element, state, breakpoint)
392
+ );
393
+ }
394
+ } @else if $state-name == 'dirty' {
395
+ @include wrap-with-where($selector: '#{$base}:not(:has(*:placeholder-shown))', $enabled: $zero-specificity) {
324
396
  @include spread-map-into-attrs(
325
397
  $map: $state-value,
326
398
  $prefix: $prefix,
327
- $props: false,
399
+ $use-custom-props: false,
328
400
  $ignore: (modifier, element, state, breakpoint)
329
401
  );
330
402
  }
331
403
  } @else if $state-name != 'current' {
332
- #{$base}:not([disabled]):#{$state-name} {
404
+ @include wrap-with-where($selector: '#{$base}:not([disabled]):#{$state-name}', $enabled: $zero-specificity) {
333
405
  @include spread-map-into-attrs(
334
406
  $map: $state-value,
335
407
  $prefix: $prefix,
336
- $props: false,
408
+ $use-custom-props: false,
337
409
  $ignore: (modifier, element, state, breakpoint)
338
410
  );
339
411
  }
@@ -346,7 +418,8 @@
346
418
  $prefix: $prefix,
347
419
  $block: $block,
348
420
  $parent-selector: '#{$base}#{$block}--#{$state-name}',
349
- $bps: $bps
421
+ $bps: $bps,
422
+ $zero-specificity: $zero-specificity
350
423
  );
351
424
  }
352
425
  }