File tree 5 files changed +14
-3
lines changed
5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 2
2
// and therefore bloating the CSS.
3
3
// 2. We need to set the background-color of the non-disabled Checkbox input to initial color when it is hovered
4
4
// or active, because we need it contrasting with the background color.
5
- // 3. Make the text selectable
5
+ // 3. Make the text selectable and allow links to be clickable in the helper text.
6
6
7
7
@use ' theme' ;
8
8
@use ' ../../theme/form-fields' as form-fields-theme ;
@@ -21,6 +21,9 @@ $_field-name: 'Checkbox';
21
21
22
22
.Checkbox__label {
23
23
@include form-fields-tools .inline-field-label ();
24
+ @include form-fields-tools .stretch (before , left );
25
+
26
+ position : relative ;
24
27
}
25
28
26
29
.Checkbox__label--hidden {
Original file line number Diff line number Diff line change 1
1
// 1. We need to set the background-color of the non-disabled Radio input to initial color when it is hovered
2
2
// or active, because we need it contrasting with the background color.
3
- // 2. Make the text selectable
3
+ // 2. Make the text selectable and allow links to be clickable in the helper text.
4
4
5
5
@use ' sass:map' ;
6
6
@use ' ../../theme/form-fields' as form-fields-theme ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ $_field-name: 'Toggle';
25
25
26
26
.Toggle__label {
27
27
@include form-fields-tools .inline-field-label ();
28
+ @include form-fields-tools .stretch (before , right );
28
29
29
30
position : relative ;
30
31
}
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ $helper-text-color-state-disabled: tokens.$disabled-content;
33
33
// Inline field form components – Checkbox, Radio, etc.
34
34
$inline-field-gap : tokens .$space-500 ;
35
35
$inline-field-margin-y : tokens .$space-500 ;
36
+ $inline-field-margin-x : tokens .$space-600 ;
36
37
$inline-field-input-border-color-checked : tokens .$form-field-filled-border-state-selected ;
37
38
$inline-field-input-border-color-checked-disabled : tokens .$disabled-background ;
38
39
$inline-field-input-border-width : tokens .$border-width-200 ;
Original file line number Diff line number Diff line change 272
272
@include typography .generate (form-fields-theme .$item-helper-text-typography );
273
273
}
274
274
275
- @mixin stretch ($pseudo-element : before ) {
275
+ @mixin stretch ($pseudo-element : before , $expand : left ) {
276
276
& ::#{$pseudo-element } {
277
277
content : ' ' ;
278
278
position : absolute ;
279
279
inset : 0 ;
280
280
z-index : 0 ;
281
+
282
+ @if $expand == ' left' {
283
+ left : - #{form-fields-theme .$inline-field-margin-x } ;
284
+ } @else {
285
+ right : - #{form-fields-theme .$inline-field-margin-x } ;
286
+ }
281
287
}
282
288
}
You can’t perform that action at this time.
0 commit comments