forked from starikovs/alt-checkbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjquery.alt-checkbox.less
86 lines (73 loc) · 1.82 KB
/
jquery.alt-checkbox.less
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
/*
* alt-checkbox LESS file
* Version 1.0
* http://alt-checkbox.starikovs.com
*
* alt-checkbox LESS file which helps to style checkbox with custom css using LESS syntax.
*
* Copyright (c) 2013 alt-checkbox.starikovs.com
* Licensed under the MIT and GPL licenses.
*/
.gradient(@start, @end) {
background: @start;
background-image: -ms-linear-gradient(top, @start 0%, @end 100%);
background-image: -moz-linear-gradient(top, @start 0%, @end 100%);
background-image: -o-linear-gradient(top, @start 0%, @end 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, @start), color-stop(1, @end));
background-image: -webkit-linear-gradient(top, @start 0%, @end 100%);
background-image: linear-gradient(to bottom, @start 0%, @end 100%);
}
.transition(@value) {
-moz-transition: @value;
-o-transition: @value;
-webkit-transition: @value;
transition: @value;
}
.alt-checkbox {
display: inline-block;
.gradient(#fbfbfb, #ededed);
border-radius: .2em;
box-shadow: 0 0 0 1px #ccc;
font-size: .8em;
line-height: 100%;
outline: none;
position: relative;
text-decoration: none;
&:hover,
&:focus {
box-shadow: 0 0 3px 1px #ffce73;
}
&:before {
display: block;
min-height: 1em;
min-width: 1em;
padding: .05em;
position: relative;
text-align: center;
text-shadow: 0 1px 0 #ddd, 0 2px 0 #fff,0 -1px 0 #ddd;
visibility: hidden;
}
&.outline-unchecked:before {
color: #eee;
visibility: visible;
}
&.checked:before {
color: #999;
visibility: visible;
}
&:focus {
outline: none;
}
}
.alt-checkbox,
.alt-checkbox-label {
&.small {
font-size: .8em;
}
&.medium {
font-size: 1.6em;
}
&.big {
font-size: 2.4em;
}
}