fix: switch style (#23791)

This commit is contained in:
xrkffgg 2020-04-30 21:02:03 +08:00 committed by GitHub
parent 9f2af262ef
commit ba9d75e3bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View File

@ -93,7 +93,8 @@
@switch-sm-height: 14px;
@switch-min-width: 40px;
@switch-sm-min-width: 24px;
@switch-inner-margin: 0 22px 0 4px;
@switch-inner-margin-min: 4px;
@switch-inner-margin-max: 22px;
// Slider
// ---

View File

@ -724,7 +724,8 @@
@switch-color: @primary-color;
@switch-bg: @component-background;
@switch-shadow-color: fade(#00230b, 20%);
@switch-inner-margin: 0 24px 0 6px;
@switch-inner-margin-min: 6px;
@switch-inner-margin-max: 24px;
// Pagination
// ---

View File

@ -23,7 +23,8 @@
&-inner {
display: block;
margin: @switch-inner-margin;
margin-right: @switch-inner-margin-min;
margin-left: @switch-inner-margin-max;
color: @text-color-inverse;
font-size: @font-size-sm;
}
@ -135,7 +136,8 @@
background-color: @switch-color;
.@{switch-prefix-cls}-inner {
margin: @switch-inner-margin;
margin-right: @switch-inner-margin-max;
margin-left: @switch-inner-margin-min;
}
&::after {

View File

@ -10,8 +10,8 @@
&-inner {
.@{switch-prefix-cls}-rtl & {
margin-right: 24px;
margin-left: 6px;
margin-right: @switch-inner-margin-max;
margin-left: @switch-inner-margin-min;
}
}
@ -51,8 +51,8 @@
&-checked {
.@{switch-prefix-cls}-inner {
.@{switch-prefix-cls}-rtl& {
margin-right: 6px;
margin-left: 24px;
margin-right: @switch-inner-margin-min;
margin-left: @switch-inner-margin-max;
}
}