@volverjs/style 0.1.24-beta.1 → 0.1.24-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/vv-dialog.css +1 -1
- package/dist/components.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +1 -1
- package/src/components/vv-accordion-group.scss +1 -1
- package/src/components/vv-accordion.scss +1 -1
- package/src/components/vv-alert-group.scss +1 -1
- package/src/components/vv-alert.scss +1 -1
- package/src/components/vv-avatar-group.scss +1 -1
- package/src/components/vv-avatar.scss +1 -1
- package/src/components/vv-badge.scss +1 -1
- package/src/components/vv-breadcrumb.scss +1 -1
- package/src/components/vv-button-group.scss +1 -1
- package/src/components/vv-button.scss +2 -2
- package/src/components/vv-card.scss +1 -1
- package/src/components/vv-checkbox-group.scss +1 -1
- package/src/components/vv-checkbox.scss +1 -1
- package/src/components/vv-dialog.scss +1 -1
- package/src/components/vv-dropdown-action.scss +1 -1
- package/src/components/vv-dropdown-optgroup.scss +1 -1
- package/src/components/vv-dropdown-option.scss +1 -1
- package/src/components/vv-dropdown.scss +1 -1
- package/src/components/vv-input-file.scss +1 -1
- package/src/components/vv-input-text.scss +1 -1
- package/src/components/vv-nav.scss +1 -1
- package/src/components/vv-progress.scss +1 -1
- package/src/components/vv-radio-group.scss +1 -1
- package/src/components/vv-radio.scss +1 -1
- package/src/components/vv-select.scss +1 -1
- package/src/components/vv-skeleton.scss +1 -1
- package/src/components/vv-tab.scss +1 -1
- package/src/components/vv-table.scss +1 -1
- package/src/components/vv-text.scss +1 -1
- package/src/components/vv-textarea.scss +1 -1
- package/src/components/vv-tooltip.scss +1 -1
- package/src/settings/components/_vv-dialog.scss +1 -0
- package/src/themes/dark/components/_vv-alert.scss +2 -1
- package/src/themes/dark/components/_vv-avatar.scss +2 -1
- package/src/themes/dark/components/_vv-badge.scss +2 -1
- package/src/themes/dark/components/_vv-button.scss +2 -1
- package/src/themes/dark/components/_vv-dropdown-action.scss +2 -1
- package/src/themes/dark/components/_vv-dropdown-option.scss +2 -1
- package/src/themes/dark/components/_vv-nav.scss +2 -1
- package/src/themes/dark/components/_vv-select.scss +2 -1
- package/src/tools/mixin-modules/_attrs.scss +5 -5
- package/src/tools/mixin-modules/_bem.scss +32 -32
- package/src/tools/mixin-modules/_theme.scss +53 -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,46 @@
|
|
|
298
312
|
}
|
|
299
313
|
|
|
300
314
|
// BEM modifier style: .block--state
|
|
301
|
-
#{$base}#{$block}--#{$state-name},
|
|
302
315
|
// Class style: .block.state
|
|
303
|
-
|
|
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) {
|
|
324
342
|
@include spread-map-into-attrs(
|
|
325
343
|
$map: $state-value,
|
|
326
344
|
$prefix: $prefix,
|
|
327
|
-
$props: false,
|
|
345
|
+
$use-custom-props: false,
|
|
328
346
|
$ignore: (modifier, element, state, breakpoint)
|
|
329
347
|
);
|
|
330
348
|
}
|
|
331
349
|
} @else if $state-name != 'current' {
|
|
332
|
-
#{$base}:not([disabled]):#{$state-name} {
|
|
350
|
+
@include wrap-with-where($selector: '#{$base}:not([disabled]):#{$state-name}', $enabled: $zero-specificity) {
|
|
333
351
|
@include spread-map-into-attrs(
|
|
334
352
|
$map: $state-value,
|
|
335
353
|
$prefix: $prefix,
|
|
336
|
-
$props: false,
|
|
354
|
+
$use-custom-props: false,
|
|
337
355
|
$ignore: (modifier, element, state, breakpoint)
|
|
338
356
|
);
|
|
339
357
|
}
|
|
@@ -346,7 +364,8 @@
|
|
|
346
364
|
$prefix: $prefix,
|
|
347
365
|
$block: $block,
|
|
348
366
|
$parent-selector: '#{$base}#{$block}--#{$state-name}',
|
|
349
|
-
$bps: $bps
|
|
367
|
+
$bps: $bps,
|
|
368
|
+
$zero-specificity: $zero-specificity
|
|
350
369
|
);
|
|
351
370
|
}
|
|
352
371
|
}
|