This repository was archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathjquery.mobile.forms.flipswitch.css
85 lines (84 loc) · 2.65 KB
/
jquery.mobile.forms.flipswitch.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
.ui-flipswitch {
display: inline-block;
vertical-align: middle;
width: 5.875em; /* Override this and padding-left in next rule if you use labels other than "on/off" and need more space */
height: 1.875em;
border-width: 1px;
border-style: solid;
margin: .5em 0;
overflow: hidden;
-webkit-transition-property: padding, width, background-color, color, border-color;
-moz-transition-property: padding, width, background-color, color, border-color;
-o-transition-property: padding, width, background-color, color, border-color;
transition-property: padding, width, background-color, color, border-color;
-webkit-transition-duration: 100ms;
-moz-transition-duration: 100ms;
-o-transition-duration: 100ms;
transition-duration: 100ms;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
}
.ui-flipswitch.ui-flipswitch-active {
padding-left: 4em; /* Override this and width in previous rule if you use labels other than "on/off" and need more space */
width: 1.875em;
}
.ui-flipswitch-input {
position: absolute;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
clip: rect(1px,1px,1px,1px);
border: 0;
outline: 0;
filter: Alpha(Opacity=0);
opacity: 0;
}
.ui-flipswitch .ui-button.ui-flipswitch-on,
.ui-flipswitch .ui-flipswitch-off {
float: left;
height: 1.75em;
margin: .0625em;
line-height: 1.65em;
}
.ui-flipswitch .ui-button.ui-flipswitch-on {
width: 1.75em;
padding: 0;
text-indent: -2.6em; /* Override this to center text if you use a label other than "on" */
text-align: left;
border-width: 1px;
border-style: solid;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: inherit;
overflow: visible;
color: inherit;
text-shadow: inherit;
}
.ui-flipswitch .ui-flipswitch-off {
padding: 1px;
text-indent: 1em; /* Override this to center text if you use a label other than "off" */
}
/* Override field container CSS to prevent the flipswitch from becoming full width */
html .ui-field-contain > label + .ui-flipswitch,
html .ui-popup .ui-field-contain > label + .ui-flipswitch {
display: inline-block;
width: 5.875em; /* If you override the width for .ui-flipswitch you should repeat the same value here */
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.ui-field-contain .ui-flipswitch.ui-flipswitch-active,
.ui-popup .ui-field-contain .ui-flipswitch.ui-flipswitch-active {
width: 1.875em;
}
/* This is super ugly but there does not seem to be a better way with current theme */
.ui-flipswitch-active .ui-btn {
color: inherit !important;
text-shadow: inherit !important;
}