Skip to content

Commit

Permalink
fix(Switch): set children text size to form-element-font-size, fix al…
Browse files Browse the repository at this point in the history
  • Loading branch information
潕量 authored Feb 10, 2022
1 parent fcc451d commit 6e2c156
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/switch/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
&-medium {
@include bounding($switch-size-m-width, $switch-size-m-trigger, #{$switch-border-width-container}, $switch-border-width-trigger, $switch-size-m-radius-container, $switch-size-m-radius-trigger);

> .#{$css-prefix}switch-children {
font-size: $form-element-medium-font-size;
}

&.#{$css-prefix}switch.#{$css-prefix}switch-on > .#{$css-prefix}switch-children {
margin: 0 calc(#{$switch-size-m-trigger} + #{$switch-size-m-trigger-padding-r}) 0 $switch-size-m-trigger-padding-l;
}
Expand All @@ -58,6 +62,10 @@
&-small {
@include bounding($switch-size-s-width, $switch-size-s-trigger, #{$switch-border-width-container}, $switch-border-width-trigger, $switch-size-s-radius-container, $switch-size-s-radius-trigger);

> .#{$css-prefix}switch-children {
font-size: $form-element-small-font-size;
}

&.#{$css-prefix}switch.#{$css-prefix}switch-on > .#{$css-prefix}switch-children {
margin: 0 calc(#{$switch-size-s-trigger} + #{$switch-size-s-trigger-padding-r}) 0 $switch-size-s-trigger-padding-l;
}
Expand Down
1 change: 0 additions & 1 deletion src/switch/scss/mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
box-sizing: border-box;
}
> .#{$css-prefix}switch-children {
font-size: $font-size-body-1;
height: $trigger-size;
line-height: $trigger-size;
}
Expand Down

0 comments on commit 6e2c156

Please sign in to comment.