-
Notifications
You must be signed in to change notification settings - Fork 19
/
ui.switchbutton.css
231 lines (196 loc) · 6.73 KB
/
ui.switchbutton.css
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/**
* jQuery switchbutton
*
* Based on work by tdreyno on iphone-style-checkboxes for events management
* (https://github.com/tdreyno/iphone-style-checkboxes)
*
* Copyright 2011, L.STEVENIN
* Released under the MIT license.
*/
.ui-switchbutton {
display: inline-block;
padding: 0;
position: relative;
overflow: hidden;
cursor: pointer;
user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
}
.ui-switchbutton input {
display: none;
}
.ui-switchbutton label {
white-space: nowrap;
cursor: pointer;
display: block;
position: absolute;
top: 0;
width: auto;
overflow: hidden;
user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
}
.ui-switchbutton label.ui-switchbutton-disabled {
right: 0;
text-align: right;
text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
}
.ui-switchbutton label.ui-switchbutton-disabled span {
display: inline-block;
text-align: center;
padding-left: 2px;
padding-right: 3px;
}
.ui-switchbutton.ui-switchbutton-no-labels label span {
width: 1em;
}
.ui-switchbutton label.ui-switchbutton-enabled {
left: 0;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
}
.ui-switchbutton label.ui-switchbutton-enabled span {
display: inline-block;
text-align: center;
padding-left: 3px;
padding-right: 2px;
}
.ui-switchbutton .ui-switchbutton-handle {
display: block;
width: 0;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
.ui-switchbutton.ui-switchbutton-disabled {
opacity: 0.4;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: Alpha(Opacity=40);
cursor: default;
}
.ui-switchbutton.ui-switchbutton-disabled label,
.ui-switchbutton.ui-switchbutton-disabled .ui-switchbutton-handle {
cursor: default;
}
/**
* STYLES
*
* Styles are composed by a default style which can be overrided by specific classed passed in argument
*/
/* Default style */
.ui-switchbutton-default {
height: 24px;
}
.ui-switchbutton-default label {
font-size: 14px;
line-height: 18px;
font-weight: bold;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
text-transform: uppercase;
height: 20px;
padding-top: 4px;
}
.ui-switchbutton-default label.ui-switchbutton-disabled {
color: #8b8b8b;
background: #e2e2e2; /* Old browsers */
background: -moz-linear-gradient(top, #7c7c7c 0%, #c5c4c5 25%, #e2e2e2 50%, #efefef 75%, #f8f8f8 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7c7c7c), color-stop(25%,#c5c4c5), color-stop(50%,#e2e2e2), color-stop(75%,#efefef), color-stop(100%,#f8f8f8)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #7c7c7c 0%,#c5c4c5 25%,#e2e2e2 50%,#efefef 75%,#f8f8f8 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #7c7c7c 0%,#c5c4c5 25%,#e2e2e2 50%,#efefef 75%,#f8f8f8 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #7c7c7c 0%,#c5c4c5 25%,#e2e2e2 50%,#efefef 75%,#f8f8f8 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7c7c7c', endColorstr='#f8f8f8',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #7c7c7c 0%,#c5c4c5 25%,#e2e2e2 50%,#efefef 75%,#f8f8f8 100%); /* W3C */
box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.5);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.ui-switchbutton-default label.ui-switchbutton-enabled {
color: white;
background: #488fe4; /* Old browsers */
background: -moz-linear-gradient(top, #2f63a0 0%, #488fe4 25%, #569aef 49%, #5d9ff2 51%, #77aff8 75%, #86b6f4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2f63a0), color-stop(25%,#488fe4), color-stop(49%,#569aef), color-stop(51%,#5d9ff2), color-stop(75%,#77aff8), color-stop(100%,#86b6f4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #2f63a0 0%,#488fe4 25%,#569aef 49%,#5d9ff2 51%,#77aff8 75%,#86b6f4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #2f63a0 0%,#488fe4 25%,#569aef 49%,#5d9ff2 51%,#77aff8 75%,#86b6f4 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #2f63a0 0%,#488fe4 25%,#569aef 49%,#5d9ff2 51%,#77aff8 75%,#86b6f4 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2f63a0', endColorstr='#86b6f4',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #2f63a0 0%,#488fe4 25%,#569aef 49%,#5d9ff2 51%,#77aff8 75%,#86b6f4 100%); /* W3C */
box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.7);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
padding-right: 4px;
}
.ui-switchbutton-default .ui-switchbutton-handle {
height: 22px;
background: #f2f2f2; /* Old browsers */
background: -moz-linear-gradient(top, #d7d7d7 0%, #fcfcfc 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d7d7d7), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d7d7d7', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* W3C */
box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 1);
border: 1px solid #a2a2a2;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/* Thin style */
.ui-switchbutton-thin {
height: 20px;
}
.ui-switchbutton-thin label {
font-size: 13px;
line-height: 16px;
height: 18px;
padding-top: 2px;
}
.ui-switchbutton-thin .ui-switchbutton-handle {
height: 18px;
}
/* iso5 style */
.ui-switchbutton-ios5 label.ui-switchbutton-disabled {
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
}
.ui-switchbutton-ios5 label.ui-switchbutton-enabled {
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-webkit-border-top-right-radius: 0px;
-moz-border-radius-topright: 0px;
border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0px;
-moz-border-radius-bottomright: 0px;
border-bottom-right-radius: 0px;
}
.ui-switchbutton-ios5 label.ui-switchbutton-enabled {
padding-right: 0px;
}
.ui-switchbutton-ios5.ui-state-active label.ui-switchbutton-enabled {
padding-right: 10px;
}
.ui-switchbutton-ios5 .ui-switchbutton-handle {
height: 22px;
width: 22px !important;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
}
/* Force sizes */
/*
.ui-switchbutton {
width: 50px;
}
.ui-switchbutton .ui-switchbutton-handle {
width: 20px;
}
*/