Browse Source

Fix switch overflow in certain situation, close #9928

pull/10309/head
afc163 6 years ago
parent
commit
2cacfe78ea
  1. 19
      components/switch/style/index.less

19
components/switch/style/index.less

@ -104,23 +104,16 @@
}
&-small&-checked {
&:before,
&:after {
&:before {
left: 100%;
margin-left: @switch-sm-checked-margin-left;
}
.@{switch-prefix-cls}-inner {
margin-left: 3px;
margin-right: 18px;
}
}
&-small:active&-checked:before,
&-small:active&-checked:after {
margin-left: -16.5px;
}
&-small&-loading:before {
animation: AntSwitchSmallLoadingCircle 1s infinite linear;
font-weight: bold;
@ -134,15 +127,15 @@
margin-right: 24px;
}
&:before,
&:after {
&:before {
left: 100%;
margin-left: -19px;
}
&:active:before,
&:active:after {
margin-left: -25px;
&:after {
left: 100%;
transform: translateX(-100%);
margin-left: -1px;
}
}

Loading…
Cancel
Save