blob: 8726ebae5534c35a3849705d8c50a2a232139dd6 (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
@import "../default/theme.less";
@checkbox-border-size: 1px;
.plx-checkbox-container {
font-size: 0;
position: relative;
}
.plx-checkbox {
position: absolute;
z-index: -1;
opacity: 0;
& + .checkbox-substitute {
position: relative;
display: inline-block;
cursor: pointer;
height: @checkbox-size;
width: @checkbox-size;
border: @checkbox-border-size solid @border-color-base;
border-radius: @radius-sm;
vertical-align: middle;
}
& + .checkbox-substitute + span {
font-weight: normal;
font-size: @font-size;
cursor: pointer;
vertical-align: middle;
.font-padding(@font-size);
}
&:hover + .checkbox-substitute {
border-color: @primary-color;
outline: none;
background-image: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
text-shadow: none;
}
&:checked + .checkbox-substitute {
border-color: @primary-color;
background-color: @primary-color;
&::after {
.checkbox-check(@component-bg);
}
}
&.portion + .checkbox-substitute {
background-color: @primary-color;
border-color: @primary-color;
opacity: 0.5;
&::after {
.checkbox-check(@component-bg);
}
}
&:disabled + .checkbox-substitute,
&[disabled] + .checkbox-substitute {
border-color: @border-color-base;
background-color: @input-bg-color-disabled;
cursor: not-allowed;
}
&:disabled + .checkbox-substitute + span,
&[disabled] + .checkbox-substitute + span {
cursor: not-allowed;
}
&.portion[disabled] + .checkbox-substitute {
background-color: @border-color-base;
border-color: @border-color-base;
&::after {
.checkbox-check(@fonticon-color);
}
}
&:checked[disabled] + .checkbox-substitute {
border-color: @border-color-base;
background-color: @border-color-base;
}
}
.checkbox-check(@color) {
content: '';
position: absolute;
display: block;
width: 6px;
height: 10px;
border: solid @color;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
.checkbox-check-left(@font-size);
top: 0;
}
.checkbox-check-left(12px) {
left: 3px;
}
.checkbox-check-left(14px) {
left: 4px;
}
.font-padding(12px) {
padding-left: 6px;
}
.font-padding(14px) {
padding-left: 10px;
}
|