Fix switch overflow in certain situation, close #9928

This commit is contained in:
afc163 2018-07-16 19:47:28 +08:00
parent 152cae4d9f
commit 2cacfe78ea

View File

@ -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;
}
}