checkbox.less
7.12 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
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
106
/*!
*/
@checkbox-border-color: darken(@base, 12%);
@checkbox-border-radius: 3px;
@checkbox-background-color: @background;
@checkbox-hover-border-color: darken(@base, 24%);
@checkbox-hover-box-shadow: none;
@checkbox-checked-border-color: darken(@base, 12%);
@checkbox-checked-background-color: @background;
@checkbox-checked-color: @accent;
@checkbox-active-border-color: lighten(@accent, 13%);
@checkbox-active-box-shadow: 0 0 2px 0 @checkbox-active-border-color;
@checkbox-disabled-background-color: @background;
@checkbox-disabled-color: darken(@base, 29%);
@checkbox-disabled-border-color: darken(@base, 12%);
@checkbox-indeterminate-gradient: @selected-gradient;
@checkbox-indeterminate-border-color: @checkbox-active-border-color;
@checkbox-indeterminate-background-color: @checkbox-checked-color;
@checkbox-indeterminate-hover-background-color: @checkbox-indeterminate-background-color;
@checkbox-indeterminate-hover-border-color: @checkbox-indeterminate-background-color;
@checkbox-indeterminate-border-radius: @checkbox-border-radius - 1;
.k-checkbox-label:before{
border-color: @checkbox-border-color;
background: @checkbox-background-color;
border-radius: @checkbox-border-radius;
}
.k-checkbox-label:hover:before,
.k-checkbox:checked + .k-checkbox-label:hover:before {
border-color: @checkbox-hover-border-color;
box-shadow: @checkbox-hover-box-shadow;
}
.k-checkbox:checked + .k-checkbox-label:before {
background-color: @checkbox-checked-background-color;
border-color: @checkbox-checked-border-color;
color: @checkbox-checked-color;
}
.k-checkbox-label:active:before {
box-shadow: @checkbox-active-box-shadow;
border-color: @checkbox-active-border-color;
}
.k-checkbox:checked + .k-checkbox-label:active:before {
box-shadow: @checkbox-active-box-shadow;
border-color: @checkbox-active-border-color;
}
.k-checkbox:disabled + .k-checkbox-label {
color: @checkbox-disabled-color;
}
.k-checkbox:disabled + .k-checkbox-label:hover:before {
box-shadow: none;
}
.k-checkbox:disabled + .k-checkbox-label:before,
.k-checkbox:checked:disabled + .k-checkbox-label:before,
.k-checkbox:checked:disabled + .k-checkbox-label:active:before,
.k-checkbox:checked:disabled + .k-checkbox-label:hover:before {
color: @checkbox-disabled-color;
background: @checkbox-disabled-background-color;
border-color: @checkbox-disabled-border-color;
border-radius: @checkbox-border-radius;
}
.k-checkbox:focus + .k-checkbox-label:before {
border-color: @checkbox-active-border-color;
box-shadow: @checkbox-active-box-shadow;
}
.k-checkbox:indeterminate + .k-checkbox-label:after {
background-color: @checkbox-indeterminate-background-color;
.composite-background(@checkbox-indeterminate-gradient);
border-color: @checkbox-indeterminate-border-color;
border-radius: @checkbox-indeterminate-border-radius;
}
.k-checkbox:indeterminate:hover + .k-checkbox-label:after {
border-color: @checkbox-indeterminate-hover-border-color;
background-color: @checkbox-indeterminate-hover-background-color;
}