Repository navigation
Expand file tree
/
Copy pathcheckboxstyle.css
More file actions
executable file
·107 lines (90 loc) · 2.38 KB
/
Copy pathcheckboxstyle.css
File metadata and controls
executable file
·107 lines (90 loc) · 2.38 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
107
@import url(https://fonts.googleapis.com/css?family=Roboto);
$md-checkbox-checked-color: rgb(51, 122, 183);
$md-checkbox-border-color: rgba(0, 0, 0, 0.54);
$md-checkbox-border-color-disabled: rgba(0, 0, 0, 0.26);
$md-checkbox-checked-color-disabled: rgba(0, 0, 0, 0.26);
$md-checkbox-margin: 1em 0;
$md-checkbox-size: 14px;
$md-checkbox-padding: .25em;
$md-checkbox-border-width: 2px;
$md-checkbox-border-radius: 0.125em;
$md-checkmark-width: 2px;
$md-checkmark-color: #fff;
$md-checkbox-label-padding: .75em;
.md-checkbox {
position: relative;
margin: $md-checkbox-margin;
text-align: left;
&.md-checkbox-inline {
display: inline-block;
}
label {
cursor: pointer;
display: inline;
line-height: $md-checkbox-size;
vertical-align: top;
clear: both;
padding-left: 1px;
&:not(:empty) {
padding-left: $md-checkbox-label-padding;
}
&:before, &:after {
content: "";
position: absolute;
left: 0;
top: 0;
}
&:before {
// box
width: $md-checkbox-size;
height: $md-checkbox-size;
background: #fff;
border: $md-checkbox-border-width solid $md-checkbox-border-color;
border-radius: $md-checkbox-border-radius;
cursor: pointer;
transition: background .3s;
}
&:after {
// checkmark
}
}
input[type="checkbox"] {
outline: 0;
visibility: hidden;
width: $md-checkbox-size;
margin: 0;
display: block;
float: left;
font-size: inherit;
&:checked {
+ label:before{
background: $md-checkbox-checked-color;
border:none;
}
+ label:after {
$md-checkmark-size: $md-checkbox-size - 2 * $md-checkbox-padding;
transform: translate($md-checkbox-padding, ($md-checkbox-size / 2) - ($md-checkmark-size / 2.6)) rotate(-45deg);
width: $md-checkmark-size;
height: $md-checkmark-size / 2;
border: $md-checkmark-width solid $md-checkmark-color;
border-top-style: none;
border-right-style: none;
}
}
&:disabled {
+ label:before{
border-color: $md-checkbox-border-color-disabled;
}
&:checked {
+ label:before{
background: $md-checkbox-checked-color-disabled;
}
}
}
}
}
// *************************************
// *************************************
*, *:before, *:after {
box-sizing: border-box;
}