-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheckbox.scss
70 lines (56 loc) · 1.15 KB
/
checkbox.scss
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
@charset "utf-8";
@import "../../../css/partials.meta";
@import "../../00-base/icons/icon";
@import "checkbox.variables";
.elm-checkbox {
@include icon("\00A0", 24, "outline", $partial: $partial);
align-content: center;
appearance: none;
background-color: $checkbox---backgroundColor;
border: #{to-rem($pxValue: 1)} solid $checkbox---borderColor;
border-radius: 4px;
color: $checkbox---color;
display: inline-flex;
height: to-rem($pxValue: 24);
justify-content: center;
width: to-rem($pxValue: 24);
&[type="checkbox"] {
vertical-align: top;
}
&::before {
--icon-font-size: 1.375rem;
margin-right: 0;
}
&:checked {
background-color: $checkbox--checked-backgroundColor;
&::before {
color: $checkbox--checked-color;
content: glyph(done);
}
}
&:enabled {
&:hover {
background-color: rgba(40, 45, 55, 0.14);
&:checked {
background-color: $checkbox-hover-checked-backgroundColor;
}
}
&:active {
background-color: rgba(40, 45, 55, 0.14);
}
}
&:indeterminate {
&::before {
content: glyph(minus);
}
}
&:disabled {
&,
& + label {
opacity: 0.5;
}
}
& + label {
margin-left: $db-spacing-xs;
}
}