Debian Codegraph @

dojox/mobile/themes/common/Switch.less

raw
1 /* dojox.mobile.Switch */
2 /* Switch - common */
3 @mbl-switch-height: 27px;
4 //
5 .mblSwitch {
6 margin: 0;
7 position: relative;
8 display: inline-block;
9 height: @mbl-switch-height;
10 line-height: @mbl-switch-height + 2;
11 overflow: hidden;
12 text-align: left;
13 .tap-highlight-color(rgba(255,255,255,0));
14 }
15 .mblListItem .mblSwitch {
16 position: absolute;
17 right: 12px;
18 top: (@mbl-list-item-height - @mbl-switch-height) / 2;
19 }
20 .mblSwitchInner {
21 position: absolute;
22 top: 0;
23 height: @mbl-switch-height;
24 }
25 .mblSwitchAnimation .mblSwitchInner {
26 .transition-property(left);
27 .transition-duration(.1s);
28 }
29 .mblSwitchOn .mblSwitchInner {
30 left: 0;
31 }
32 .mblSwitchBg {
33 position: absolute;
34 top: 0;
35 width: 94px;
36 height: @mbl-switch-height;
37 font-family: Helvetica;
38 font-size: 16px;
39 font-weight: bold;
40 line-height: @mbl-switch-height + 2;
41 .box-sizing(border-box);
42 .mblSwitchBg-styles;
43 }
44 .mblSwitchBgLeft {
45 left: 0;
46 color: white;
47 background-color: #3f84eb;
48 .mbl-switch-bg-left-background-image();
49 }
50 .mblSwitchBgRight {
51 color: #7f7f7f;
52 .mbl-switch-bg-right-background-image();
53 }
54 .mblSwitchKnob {
55 position: absolute;
56 top: 0;
57 height: @mbl-switch-height;
58 .mbl-switch-knob-background-image();
59 font-size: 1px;
60 .box-sizing(border-box);
61 .mblSwitchKnob-styles;
62 }
63 .mblSwitchText {
64 position: relative;
65 top: 0;
66 width: 53px;
67 height: @mbl-switch-height;
68 padding: 0;
69 line-height: 28px;
70 text-align: center;
71 }
72 .mblSwitchTextLeft {
73 left: 0;
74 }
75 .mblSwitchTextRight {
76 left: 40px;
77 }
78
79 /* Square Shape */
80 .mblSwSquareShape-styles () {
81 width: 94px;
82 &.mblSwitchOff .mblSwitchInner {
83 left: -53px;
84 }
85 .mblSwitchBg {
86 border-radius: @mbl-switch-square-border-radius;
87 }
88 .mblSwitchBgRight {
89 left: 53px;
90 }
91 .mblSwitchKnob {
92 left: 53px;
93 width: 41px;
94 border-radius: @mbl-switch-square-border-radius;
95 }
96 .mblSwitchText {
97 width: 53px;
98 }
99 .mblSwitchTextRight {
100 left: 40px;
101 }
102 }
103 .mblSwSquareShape {
104 .mblSwSquareShape-styles;
105 }
106
107 /* Round Shape1 */
108 .mblSwRoundShape1-styles () {
109 width: 77px;
110 &.mblSwitchOff .mblSwitchInner {
111 left: -50px;
112 }
113 .mblSwitchBg {
114 width: 77px;
115 border-radius: 14px;
116 }
117 .mblSwitchBgRight {
118 left: 50px;
119 }
120 .mblSwitchKnob {
121 left: 50px;
122 width: 27px;
123 border-radius: 13px;
124 }
125 .mblSwitchText {
126 width: 50px;
127 }
128 .mblSwitchTextRight {
129 left: 26px;
130 }
131 }
132 .mblSwRoundShape1 {
133 .mblSwRoundShape1-styles;
134 }
135
136 /* Round Shape2 */
137 .mblSwRoundShape2-styles () {
138 width: 94px;
139 &.mblSwitchOff .mblSwitchInner {
140 left: -51px;
141 }
142 .mblSwitchBg {
143 border-radius: 14px;
144 }
145 .mblSwitchBgRight {
146 left: 51px;
147 }
148 .mblSwitchKnob {
149 left: 51px;
150 width: 43px;
151 border-radius: 13px;
152 }
153 .mblSwitchText {
154 width: 51px;
155 }
156 .mblSwitchTextRight {
157 left: 42px;
158 }
159 }
160 .mblSwRoundShape2 {
161 .mblSwRoundShape2-styles;
162 }
163
164 /* Arc Shape1 */
165 .mblSwArcShape1-styles () {
166 width: 77px;
167 &.mblSwitchOff .mblSwitchInner {
168 left: -50px;
169 }
170 .mblSwitchBg {
171 width: 77px;
172 border-radius: ~"5px/14px";
173 }
174 .mblSwitchBgRight {
175 left: 50px;
176 }
177 .mblSwitchKnob {
178 left: 50px;
179 width: 27px;
180 border-radius: ~"5px/13px";
181 }
182 .mblSwitchText {
183 width: 50px;
184 }
185 .mblSwitchTextRight {
186 left: 26px;
187 }
188 }
189 .mblSwArcShape1 {
190 .mblSwArcShape1-styles;
191 }
192
193 /* Arc Shape2 */
194 .mblSwArcShape2-styles () {
195 width: 94px;
196 &.mblSwitchOff .mblSwitchInner {
197 left: -51px;
198 }
199 .mblSwitchBg {
200 border-radius: ~"5px/14px";
201 }
202 .mblSwitchBgRight {
203 left: 51px;
204 }
205 .mblSwitchKnob {
206 left: 51px;
207 width: 43px;
208 border-radius: ~"5px/13px";
209 }
210 .mblSwitchText {
211 width: 51px;
212 }
213 .mblSwitchTextRight {
214 left: 42px;
215 }
216 }
217 .mblSwArcShape2 {
218 .mblSwArcShape2-styles;
219 }