vanilla-framework 3.0.0-beta.1 → 3.0.1

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.
@@ -1,90 +1,302 @@
1
+ @use 'sass:math';
1
2
  @import 'settings';
2
3
 
3
4
  @mixin vf-p-chip {
4
- $chip-line-height: 1rem;
5
- $base-background-opacity-amount: 0.05;
6
- $color-background-base: adjust-color($color-x-dark, $lightness: 100% * (1 - $base-background-opacity-amount));
7
- $color-background-hover: adjust-color($color-x-dark, $lightness: 100% * (1 - ($base-background-opacity-amount + $hover-background-opacity-amount)));
8
-
9
- .p-chip {
5
+ %vf-chip {
10
6
  @extend %small-text;
7
+ @include vf-animation(#{background-color, border-color}, snap, out);
8
+ @include vf-focus;
11
9
 
12
- background-color: $color-background-base;
13
- border-radius: $chip-line-height;
10
+ align-items: baseline;
11
+ border-radius: 1rem;
14
12
  display: inline-flex;
15
- line-height: $chip-line-height;
16
- margin: map-get($nudges, nudge--p) $sph--small 0 0;
13
+ margin: 0 $sph--small $input-margin-bottom 0;
17
14
  max-width: 100%;
18
- padding-bottom: 0.25rem;
19
- padding-left: $sph--large;
20
- padding-right: $sph--large;
21
- padding-top: 0.25rem;
15
+ padding: calc(#{$spv--x-small} - 1px) $sph--small; // account for border thickness using calc
16
+ position: relative;
22
17
  user-select: none;
18
+ vertical-align: calc(1px - #{map-get($nudges, p)});
23
19
  white-space: nowrap;
24
20
 
25
- &:hover {
26
- background-color: $color-background-hover;
27
- }
28
-
29
- &.is-selected,
30
- &:active {
31
- background-color: $colors--light-theme--background-active;
32
- }
33
-
34
21
  .p-chip__lead,
35
22
  .p-chip__value {
23
+ display: inline;
36
24
  margin-bottom: 0;
37
25
  overflow: hidden;
26
+ padding: 0;
38
27
  text-overflow: ellipsis;
28
+ vertical-align: baseline;
39
29
  }
40
30
 
41
31
  .p-chip__lead {
42
- $space-between-lead-and-value: 0.25rem;
43
- @extend %muted-text;
44
32
  @extend %x-small-text;
45
33
 
46
- line-height: $chip-line-height;
47
- padding-right: $space-between-lead-and-value * 2;
48
- padding-top: 0.1rem;
49
- position: relative;
50
34
  text-transform: uppercase;
35
+ }
51
36
 
52
- &::after {
53
- content: '\00a0:';
54
- position: absolute;
55
- right: $space-between-lead-and-value;
56
- }
37
+ .p-chip__lead + .p-chip__value::before {
38
+ @extend %x-small-text;
39
+
40
+ content: ': ';
57
41
  }
58
42
 
59
43
  .p-chip__value {
60
44
  @extend %small-text;
45
+ font-weight: $font-weight-bold;
46
+ }
47
+
48
+ .p-chip__dismiss {
49
+ @extend %icon;
50
+ // also includes button and close icon styles in the theming section
61
51
 
62
- line-height: $chip-line-height;
63
- padding-top: 0.05rem;
52
+ align-self: center;
53
+ background-size: map-get($icon-sizes, small);
54
+ border-radius: 50%;
55
+ flex: 0 0 auto;
56
+ margin-left: $sph--x-small;
57
+ @media (min-width: $breakpoint-x-large) {
58
+ background-size: math.div(map-get($icon-sizes, small), $font-size-ratio--largescreen); //ensure no rounding happens as it positions the icon off center
59
+ }
64
60
  }
65
61
 
62
+ &.is-dense {
63
+ padding: 0 $sph--small;
64
+ }
65
+
66
+ &.is-inline {
67
+ margin: 0;
68
+ vertical-align: baseline;
69
+ }
70
+ }
71
+
72
+ .p-chip,
73
+ .p-chip--positive,
74
+ .p-chip--caution,
75
+ .p-chip--negative,
76
+ .p-chip--information {
77
+ @extend %vf-chip;
78
+ }
79
+
80
+ // Theming
81
+ @if ($theme-default-p-chip == 'dark') {
82
+ .p-chip {
83
+ @include vf-chip-dark-theme;
84
+ }
85
+ .p-chip.is-light {
86
+ @include vf-chip-light-theme;
87
+ }
88
+ // stylelint-disable-next-line selector-max-type
89
+ button.p-chip {
90
+ @include vf-chip-dark-theme($is-interactive: true);
91
+ }
92
+ // stylelint-disable-next-line selector-max-type
93
+ button.p-chip.is-light {
94
+ @include vf-chip-light-theme($is-interactive: true);
95
+ }
96
+
97
+ .p-chip--positive {
98
+ @include vf-chip-dark-theme(positive);
99
+ }
100
+ .p-chip--positive.is-light {
101
+ @include vf-chip-light-theme(positive);
102
+ }
103
+ // stylelint-disable-next-line selector-max-type
104
+ button.p-chip--positive {
105
+ @include vf-chip-dark-theme($chip-type: positive, $is-interactive: true);
106
+ }
107
+ // stylelint-disable-next-line selector-max-type
108
+ button.p-chip--positive.is-light {
109
+ @include vf-chip-light-theme($chip-type: positive, $is-interactive: true);
110
+ }
111
+
112
+ .p-chip--caution {
113
+ @include vf-chip-dark-theme(caution);
114
+ }
115
+ .p-chip--caution.is-light {
116
+ @include vf-chip-light-theme(caution);
117
+ }
118
+ // stylelint-disable-next-line selector-max-type
119
+ button.p-chip--caution {
120
+ @include vf-chip-dark-theme($chip-type: caution, $is-interactive: true);
121
+ }
122
+ // stylelint-disable-next-line selector-max-type
123
+ button.p-chip--caution.is-light {
124
+ @include vf-chip-light-theme($chip-type: caution, $is-interactive: true);
125
+ }
126
+
127
+ .p-chip--negative {
128
+ @include vf-chip-dark-theme(negative);
129
+ }
130
+ .p-chip--negative.is-light {
131
+ @include vf-chip-light-theme(negative);
132
+ }
133
+ // stylelint-disable-next-line selector-max-type
134
+ button.p-chip--negative {
135
+ @include vf-chip-dark-theme($chip-type: negative, $is-interactive: true);
136
+ }
137
+ // stylelint-disable-next-line selector-max-type
138
+ button.p-chip--negative.is-light {
139
+ @include vf-chip-light-theme($chip-type: negative, $is-interactive: true);
140
+ }
141
+
142
+ .p-chip--information {
143
+ @include vf-chip-dark-theme(information);
144
+ }
145
+ .p-chip--information.is-light {
146
+ @include vf-chip-light-theme(information);
147
+ }
148
+ // stylelint-disable-next-line selector-max-type
149
+ button.p-chip--information {
150
+ @include vf-chip-dark-theme($chip-type: information, $is-interactive: true);
151
+ }
152
+ // stylelint-disable-next-line selector-max-type
153
+ button.p-chip--information.is-light {
154
+ @include vf-chip-light-theme($chip-type: information, $is-interactive: true);
155
+ }
156
+ } @else {
157
+ .p-chip {
158
+ @include vf-chip-light-theme;
159
+ }
160
+ .p-chip.is-dark {
161
+ @include vf-chip-dark-theme;
162
+ }
163
+ // stylelint-disable-next-line selector-max-type
164
+ button.p-chip {
165
+ @include vf-chip-light-theme($is-interactive: true);
166
+ }
167
+ // stylelint-disable-next-line selector-max-type
168
+ button.p-chip.is-dark {
169
+ @include vf-chip-dark-theme($is-interactive: true);
170
+ }
171
+
172
+ .p-chip--positive {
173
+ @include vf-chip-light-theme(positive);
174
+ }
175
+ .p-chip--positive.is-dark {
176
+ @include vf-chip-dark-theme(positive);
177
+ }
178
+ // stylelint-disable-next-line selector-max-type
179
+ button.p-chip--positive {
180
+ @include vf-chip-light-theme($chip-type: positive, $is-interactive: true);
181
+ }
182
+ // stylelint-disable-next-line selector-max-type
183
+ button.p-chip--positive.is-dark {
184
+ @include vf-chip-dark-theme($chip-type: positive, $is-interactive: true);
185
+ }
186
+
187
+ .p-chip--caution {
188
+ @include vf-chip-light-theme(caution);
189
+ }
190
+ .p-chip--caution.is-dark {
191
+ @include vf-chip-dark-theme(caution);
192
+ }
193
+ // stylelint-disable-next-line selector-max-type
194
+ button.p-chip--caution {
195
+ @include vf-chip-light-theme($chip-type: caution, $is-interactive: true);
196
+ }
197
+ // stylelint-disable-next-line selector-max-type
198
+ button.p-chip--caution.is-dark {
199
+ @include vf-chip-dark-theme($chip-type: caution, $is-interactive: true);
200
+ }
201
+
202
+ .p-chip--negative {
203
+ @include vf-chip-light-theme(negative);
204
+ }
205
+ .p-chip--negative.is-dark {
206
+ @include vf-chip-dark-theme(negative);
207
+ }
208
+ // stylelint-disable-next-line selector-max-type
209
+ button.p-chip--negative {
210
+ @include vf-chip-light-theme($chip-type: negative, $is-interactive: true);
211
+ }
212
+ // stylelint-disable-next-line selector-max-type
213
+ button.p-chip--negative.is-dark {
214
+ @include vf-chip-dark-theme($chip-type: negative, $is-interactive: true);
215
+ }
216
+
217
+ .p-chip--information {
218
+ @include vf-chip-light-theme(information);
219
+ }
220
+ .p-chip--information.is-dark {
221
+ @include vf-chip-dark-theme(information);
222
+ }
223
+ // stylelint-disable-next-line selector-max-type
224
+ button.p-chip--information {
225
+ @include vf-chip-light-theme($chip-type: information, $is-interactive: true);
226
+ }
227
+ // stylelint-disable-next-line selector-max-type
228
+ button.p-chip--information.is-dark {
229
+ @include vf-chip-dark-theme($chip-type: information, $is-interactive: true);
230
+ }
231
+ }
232
+ }
233
+
234
+ @mixin vf-chip-theme($chip-type: neutral, $is-interactive: false, $colors-chip-tinted-backgrounds, $colors-chip-tinted-borders, $color-chip-value, $color-chip-lead) {
235
+ @if (not map-has-key($colors-chip-tinted-backgrounds, $chip-type)) {
236
+ $chip-type: neutral;
237
+ }
238
+
239
+ $color-background: map-get($colors-chip-tinted-backgrounds, $chip-type, 'default');
240
+ $color-background-hover: map-get($colors-chip-tinted-backgrounds, $chip-type, 'hover');
241
+ $color-background-active: map-get($colors-chip-tinted-backgrounds, $chip-type, 'active');
242
+ $color-border: map-get($colors-chip-tinted-borders, $chip-type);
243
+
244
+ background-color: $color-background;
245
+ border: 1px solid $color-border;
246
+
247
+ .p-chip__value {
248
+ color: $color-chip-value;
249
+ }
250
+ .p-chip__lead,
251
+ .p-chip__lead + .p-chip__value::before {
252
+ color: $color-chip-lead;
253
+ }
254
+
255
+ @if ($is-interactive) {
256
+ &:hover {
257
+ background-color: $color-background-hover;
258
+ border-color: $color-border;
259
+ }
260
+ &[aria-pressed='true'],
261
+ &.is-selected,
262
+ &:active {
263
+ background-color: $color-background-active;
264
+ border-color: $color-border;
265
+ }
266
+ } @else {
66
267
  .p-chip__dismiss {
268
+ @include vf-icon-close($color-chip-lead);
269
+
67
270
  @include vf-button-pattern(
68
271
  $button-background-color: transparent,
69
272
  $button-border-color: transparent,
70
- $button-hover-background-color: transparent,
71
- $button-hover-border-color: transparent
273
+ $button-hover-background-color: $color-background-hover,
274
+ $button-hover-border-color: transparent,
275
+ $button-active-background-color: $color-background-active,
276
+ $button-active-border-color: transparent
72
277
  );
73
-
74
- border: none;
75
- display: block;
76
- flex: 0 0 auto;
77
- left: $sp-unit * 0.5;
78
- line-height: 1rem;
79
- margin-bottom: 0;
80
- margin-right: -$sp-unit * 0.5;
81
- padding: 0;
82
- position: relative;
83
- top: 0.05rem;
84
-
85
- [class*='p-icon'] {
86
- vertical-align: calc(#{0.5 * $cap-height} - #{0.5 * $default-icon-size});
87
- }
88
278
  }
89
279
  }
90
280
  }
281
+
282
+ @mixin vf-chip-light-theme($chip-type: neutral, $is-interactive: false) {
283
+ @include vf-chip-theme(
284
+ $chip-type: $chip-type,
285
+ $is-interactive: $is-interactive,
286
+ $colors-chip-tinted-backgrounds: $colors-light-theme--tinted-backgrounds,
287
+ $colors-chip-tinted-borders: $colors-light-theme--tinted-borders,
288
+ $color-chip-value: $colors--light-theme--text-default,
289
+ $color-chip-lead: $colors--light-theme--text-default
290
+ );
291
+ }
292
+
293
+ @mixin vf-chip-dark-theme($chip-type: neutral, $is-interactive: false) {
294
+ @include vf-chip-theme(
295
+ $chip-type: $chip-type,
296
+ $is-interactive: $is-interactive,
297
+ $colors-chip-tinted-backgrounds: $colors-dark-theme--tinted-backgrounds,
298
+ $colors-chip-tinted-borders: $colors-dark-theme--tinted-borders,
299
+ $color-chip-value: $colors--dark-theme--text-default,
300
+ $color-chip-lead: $colors--dark-theme--text-default
301
+ );
302
+ }
@@ -28,7 +28,7 @@
28
28
  &:not(:first-child)::before {
29
29
  bottom: 0;
30
30
  content: '';
31
- left: map-get($grid-gutter-widths, large) * -0.5; // "large" here is not a typo. The grid switches to 12 columns at breakpoint medium. Hence the use of large-screen gutter
31
+ left: map-get($grid-gutter-widths, default) * -0.5; // "large" here is not a typo. The grid switches to 12 columns at breakpoint medium. Hence the use of large-screen gutter
32
32
  position: absolute;
33
33
  top: 0;
34
34
  width: 1px;
@@ -128,13 +128,13 @@
128
128
  right: map-get($grid-margin-widths, small);
129
129
 
130
130
  @media (min-width: $threshold-4-6-col) and (max-width: $threshold-6-12-col - 1) {
131
- left: map-get($grid-margin-widths, medium);
132
- right: map-get($grid-margin-widths, medium);
131
+ left: map-get($grid-margin-widths, default);
132
+ right: map-get($grid-margin-widths, default);
133
133
  }
134
134
 
135
135
  @media (min-width: $threshold-6-12-col) {
136
- left: map-get($grid-margin-widths, large);
137
- right: map-get($grid-margin-widths, large);
136
+ left: map-get($grid-margin-widths, default);
137
+ right: map-get($grid-margin-widths, default);
138
138
  }
139
139
  }
140
140
  }
@@ -22,12 +22,12 @@
22
22
  height: map-get($icon-sizes, heading-icon--small);
23
23
  margin-bottom: 0;
24
24
  margin-right: $sph--large;
25
- margin-top: map-get($nudges, nudge--h3-mobile);
25
+ margin-top: map-get($nudges, h3-mobile);
26
26
  width: map-get($icon-sizes, heading-icon--small);
27
27
 
28
28
  @media (min-width: $breakpoint-heading-threshold) {
29
29
  height: map-get($icon-sizes, heading-icon);
30
- margin-top: map-get($nudges, nudge--h3);
30
+ margin-top: map-get($nudges, h3);
31
31
  width: map-get($icon-sizes, heading-icon);
32
32
  }
33
33
  }
@@ -9,7 +9,7 @@
9
9
  border-radius: $border-radius;
10
10
  display: inline-block;
11
11
  font-weight: $font-weight-bold;
12
- padding: map-get($nudges, nudge--x-small) $sph--small;
12
+ padding: map-get($nudges, x-small) $sph--small;
13
13
  text-align: center;
14
14
  text-decoration: none;
15
15
  white-space: nowrap;
@@ -22,52 +22,28 @@
22
22
  color: $color-x-light;
23
23
  }
24
24
 
25
- @include vf-p-label-validated;
26
- @include vf-p-label-in-progress;
27
- @include vf-p-label-new;
28
- @include vf-p-label-updated;
29
- @include vf-p-label-deprecated;
30
- }
31
-
32
- // Override local variables
33
- @mixin vf-p-label-validated {
34
- .p-label--validated {
25
+ .p-label--positive {
35
26
  @extend %vf-label;
36
27
 
37
- background-color: $color-label-validated;
28
+ background-color: $color-positive;
38
29
  color: $color-x-light;
39
30
  }
40
- }
41
31
 
42
- @mixin vf-p-label-in-progress {
43
- .p-label--in-progress {
32
+ .p-label--caution {
44
33
  @extend %vf-label;
45
34
 
46
35
  background-color: $color-caution;
47
36
  color: $color-dark;
48
37
  }
49
- }
50
38
 
51
- @mixin vf-p-label-new {
52
- .p-label--new {
53
- @extend %vf-label;
54
-
55
- background-color: $color-positive;
56
- color: $color-x-light;
57
- }
58
- }
59
-
60
- @mixin vf-p-label-updated {
61
- .p-label--updated {
39
+ .p-label--information {
62
40
  @extend %vf-label;
63
41
 
64
42
  background-color: $color-information;
65
43
  color: $color-x-light;
66
44
  }
67
- }
68
45
 
69
- @mixin vf-p-label-deprecated {
70
- .p-label--deprecated {
46
+ .p-label--negative {
71
47
  @extend %vf-label;
72
48
 
73
49
  background-color: $color-negative;
@@ -16,14 +16,14 @@
16
16
  @if $breakpoint == medium {
17
17
  $grid-column-count: $grid-columns-medium;
18
18
  $grid-column-prefix: $grid-medium-col-prefix;
19
- $gutter: map-get($grid-gutter-widths, medium);
19
+ $gutter: map-get($grid-gutter-widths, default);
20
20
  $media-query-keyword: min-width;
21
21
  $media-query-width: $threshold-4-6-col;
22
22
  $logo-column-span: 1;
23
23
  } @else if $breakpoint == large {
24
24
  $grid-column-count: $grid-columns;
25
25
  $grid-column-prefix: $grid-large-col-prefix;
26
- $gutter: map-get($grid-gutter-widths, large);
26
+ $gutter: map-get($grid-gutter-widths, default);
27
27
  $media-query-keyword: min-width;
28
28
  $media-query-width: $threshold-6-12-col;
29
29
  $logo-column-span: 2;
@@ -103,8 +103,8 @@
103
103
  }
104
104
 
105
105
  $margin-small: map-get($grid-gutter-widths, small);
106
- $margin-medium: map-get($grid-gutter-widths, medium);
107
- $margin-large: map-get($grid-gutter-widths, large);
106
+ $margin-medium: map-get($grid-gutter-widths, default);
107
+ $margin-large: map-get($grid-gutter-widths, default);
108
108
 
109
109
  .p-logo-section__items {
110
110
  display: flex;
@@ -101,12 +101,12 @@
101
101
  width: $matrix-img-width;
102
102
 
103
103
  @media (min-width: $breakpoint-heading-threshold) {
104
- margin-top: -#{map-get($nudges, nudge--h4)};
104
+ margin-top: -#{map-get($nudges, h4)};
105
105
  }
106
106
 
107
107
  @if ($increase-font-size-on-larger-screens) {
108
108
  @media (min-width: $breakpoint-x-large) {
109
- margin-top: -#{map-get($nudges, nudge--h4-large)};
109
+ margin-top: -#{map-get($nudges, h4-large)};
110
110
  }
111
111
  }
112
112
  }
@@ -126,12 +126,12 @@
126
126
  @extend %vf-heading-4;
127
127
 
128
128
  @media (min-width: $breakpoint-heading-threshold) {
129
- margin-bottom: -#{map-get($nudges, nudge--h4)};
129
+ margin-bottom: -#{map-get($nudges, h4)};
130
130
  }
131
131
 
132
132
  @if ($increase-font-size-on-larger-screens) {
133
133
  @media (min-width: $breakpoint-x-large) {
134
- margin-bottom: -#{map-get($nudges, nudge--h4-large)};
134
+ margin-bottom: -#{map-get($nudges, h4-large)};
135
135
  }
136
136
  }
137
137
  }
@@ -14,7 +14,7 @@ $lightness-threshold: 70;
14
14
  padding-left: map-get($grid-margin-widths, small);
15
15
 
16
16
  @media (min-width: $threshold-4-6-col) {
17
- padding-left: map-get($grid-margin-widths, medium);
17
+ padding-left: map-get($grid-margin-widths, default);
18
18
  }
19
19
 
20
20
  @media (min-width: $breakpoint-navigation-threshold) {
@@ -27,7 +27,7 @@ $lightness-threshold: 70;
27
27
  padding-right: map-get($grid-margin-widths, small);
28
28
 
29
29
  @media (min-width: $threshold-4-6-col) {
30
- padding-right: map-get($grid-margin-widths, medium);
30
+ padding-right: map-get($grid-margin-widths, default);
31
31
  }
32
32
 
33
33
  @media (min-width: $breakpoint-navigation-threshold) {
@@ -102,8 +102,8 @@ $lightness-threshold: 70;
102
102
  order: -1;
103
103
 
104
104
  @media (min-width: $threshold-4-6-col) {
105
- margin-left: map-get($grid-margin-widths, medium);
106
- margin-right: map-get($grid-margin-widths, medium);
105
+ margin-left: map-get($grid-margin-widths, default);
106
+ margin-right: map-get($grid-margin-widths, default);
107
107
  }
108
108
 
109
109
  @media (min-width: $breakpoint-navigation-threshold) {
@@ -207,7 +207,7 @@ $lightness-threshold: 70;
207
207
  display: flex;
208
208
  flex-direction: row;
209
209
  justify-content: space-between;
210
- margin-right: map-get($grid-margin-widths, large);
210
+ margin-right: map-get($grid-margin-widths, default);
211
211
  width: 100%;
212
212
  }
213
213
  }
@@ -332,11 +332,11 @@ $lightness-threshold: 70;
332
332
  position: absolute;
333
333
  right: map-get($grid-margin-widths, small);
334
334
  text-indent: calc(100% + 10rem);
335
- top: calc(#{$spv--large} + #{map-get($nudges, nudge--x-small)});
335
+ top: calc(#{$spv--large} + #{map-get($nudges, x-small)});
336
336
  width: map-get($icon-sizes, default);
337
337
 
338
338
  @media (min-width: $threshold-4-6-col) {
339
- right: map-get($grid-margin-widths, medium);
339
+ right: map-get($grid-margin-widths, default);
340
340
  }
341
341
 
342
342
  @media (min-width: $breakpoint-navigation-threshold) {
@@ -435,11 +435,11 @@ $lightness-threshold: 70;
435
435
  position: absolute;
436
436
  right: map-get($grid-margin-widths, small);
437
437
  text-indent: calc(100% + 10rem);
438
- top: calc(#{$spv--large} + #{map-get($nudges, nudge--x-small)});
438
+ top: calc(#{$spv--large} + #{map-get($nudges, x-small)});
439
439
  width: map-get($icon-sizes, default);
440
440
 
441
441
  @media (min-width: $threshold-4-6-col) {
442
- right: map-get($grid-margin-widths, medium);
442
+ right: map-get($grid-margin-widths, default);
443
443
  }
444
444
 
445
445
  @media (min-width: $breakpoint-navigation-threshold) {
@@ -47,8 +47,8 @@
47
47
  }
48
48
 
49
49
  .p-chip {
50
- margin-bottom: $sp-x-small;
51
- margin-top: $sp-x-small;
50
+ margin-bottom: $spv--x-small;
51
+ margin-top: $spv--x-small;
52
52
  }
53
53
 
54
54
  .p-search-and-filter__selected-count {
@@ -154,11 +154,15 @@
154
154
  }
155
155
 
156
156
  .p-chip {
157
- @include vf-focus;
157
+ margin-bottom: $spv--small;
158
158
 
159
- cursor: pointer;
159
+ // hide chips lead when there are in panel
160
+ // FIXME: this should be handled in HTML/React, not CSS
161
+ .p-chip__lead {
162
+ display: none;
163
+ }
160
164
 
161
- &__lead {
165
+ .p-chip__lead + .p-chip__value::before {
162
166
  display: none;
163
167
  }
164
168
  }
@@ -175,7 +179,7 @@
175
179
  position: relative;
176
180
 
177
181
  &[aria-expanded='false'] {
178
- max-height: 4rem;
182
+ max-height: 5rem; // 2 rows of chips
179
183
  }
180
184
  }
181
185
 
@@ -357,11 +357,11 @@
357
357
  #{$prop}: $multiplier * map-get($grid-margin-widths, small) + $offset;
358
358
 
359
359
  @media (min-width: $threshold-4-6-col) {
360
- #{$prop}: $multiplier * map-get($grid-margin-widths, medium) + $offset;
360
+ #{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
361
361
  }
362
362
 
363
363
  @media (min-width: $threshold-6-12-col) {
364
- #{$prop}: $multiplier * map-get($grid-margin-widths, large) + $offset;
364
+ #{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
365
365
  }
366
366
  }
367
367
 
@@ -3,11 +3,13 @@ $knob-size: $sp-unit * 3;
3
3
 
4
4
  @mixin vf-p-switch {
5
5
  .p-switch {
6
- height: $knob-size;
6
+ display: flex;
7
+ }
8
+
9
+ .p-switch__input {
7
10
  margin: 0;
8
- opacity: 0 !important; // override higher specificity of [type='checkbox'] selector
9
- position: absolute !important; // override higher specificity of [type='checkbox'] selector
10
- width: $knob-size * 2;
11
+ opacity: 0;
12
+ position: absolute;
11
13
 
12
14
  &:checked + .p-switch__slider::before {
13
15
  left: 50%;
@@ -31,9 +33,9 @@ $knob-size: $sp-unit * 3;
31
33
 
32
34
  background: linear-gradient(to right, $color-link 50%, $color-mid-light 50%);
33
35
  box-shadow: inset 0 2px 5px 0 transparentize($color-dark, 0.8);
34
- display: block;
36
+ display: inline-block;
35
37
  height: $knob-size;
36
- margin: $spv-nudge-compensation 0 0 0;
38
+ margin: 0;
37
39
  position: relative;
38
40
  width: $knob-size * 2;
39
41
 
@@ -49,11 +51,9 @@ $knob-size: $sp-unit * 3;
49
51
  position: absolute;
50
52
  width: $knob-size;
51
53
  }
54
+ }
52
55
 
53
- // FIXME: we shouldn't be targeting span elements here
54
- // stylelint-disable-next-line selector-max-type
55
- & span {
56
- @extend %vf-hide-text;
57
- }
56
+ .p-switch__label {
57
+ margin-left: $sph--small;
58
58
  }
59
59
  }