2020-03-17 14:22:09 +08:00
|
|
|
@import '../../style/themes/index';
|
|
|
|
@import '../../style/mixins/index';
|
|
|
|
|
|
|
|
@switch-prefix-cls: ~'@{ant-prefix}-switch';
|
|
|
|
|
2021-09-07 16:14:20 +08:00
|
|
|
@switch-pin-size: @switch-height - 4px;
|
|
|
|
@switch-sm-pin-size: @switch-sm-height - 4px;
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
.@{switch-prefix-cls}-rtl {
|
|
|
|
direction: rtl;
|
2020-03-17 14:22:09 +08:00
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
.@{switch-prefix-cls}-inner {
|
|
|
|
margin: 0 @switch-inner-margin-max 0 @switch-inner-margin-min;
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
.@{switch-prefix-cls}-handle {
|
|
|
|
right: @switch-padding;
|
|
|
|
left: auto;
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
&:not(&-disabled):active {
|
|
|
|
.@{switch-prefix-cls}-handle::before {
|
|
|
|
right: 0;
|
|
|
|
left: -30%;
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
&.@{switch-prefix-cls}-checked {
|
|
|
|
.@{switch-prefix-cls}-handle::before {
|
|
|
|
right: -30%;
|
|
|
|
left: 0;
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
&.@{switch-prefix-cls}-checked {
|
2020-03-17 14:22:09 +08:00
|
|
|
.@{switch-prefix-cls}-inner {
|
2020-05-18 17:31:46 +08:00
|
|
|
margin: 0 @switch-inner-margin-min 0 @switch-inner-margin-max;
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
.@{switch-prefix-cls}-handle {
|
|
|
|
right: calc(100% - @switch-pin-size - @switch-padding);
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-18 17:31:46 +08:00
|
|
|
&.@{switch-prefix-cls}-small {
|
|
|
|
&.@{switch-prefix-cls}-checked {
|
|
|
|
.@{switch-prefix-cls}-handle {
|
|
|
|
right: calc(100% - @switch-sm-pin-size - @switch-padding);
|
|
|
|
}
|
2020-03-17 14:22:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|