rtl.less
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './index';
@switch-prefix-cls: ~'@{ant-prefix}-switch';
.@{switch-prefix-cls}-rtl {
direction: rtl;
.@{switch-prefix-cls}-inner {
margin: 0 @switch-inner-margin-max 0 @switch-inner-margin-min;
}
.@{switch-prefix-cls}-handle {
right: @switch-padding;
left: auto;
}
&:not(&-disabled):active {
.@{switch-prefix-cls}-handle::before {
right: 0;
left: -30%;
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-handle::before {
right: -30%;
left: 0;
}
}
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-inner {
margin: 0 @switch-inner-margin-min 0 @switch-inner-margin-max;
}
.@{switch-prefix-cls}-handle {
right: calc(100% - @switch-pin-size - @switch-padding);
}
}
&.@{switch-prefix-cls}-small {
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-handle {
right: calc(100% - @switch-sm-pin-size - @switch-padding);
}
}
}
}