bootstrap-switch.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. /* ========================================================================
  2. * bootstrap-switch - v2.0.1
  3. * http://www.bootstrap-switch.org
  4. * ========================================================================
  5. * Copyright 2012-2013 Mattia Larentis
  6. *
  7. * ========================================================================
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. * ========================================================================
  20. */
  21. .clearfix {
  22. *zoom: 1;
  23. }
  24. .clearfix:before,
  25. .clearfix:after {
  26. display: table;
  27. content: "";
  28. line-height: 0;
  29. }
  30. .clearfix:after {
  31. clear: both;
  32. }
  33. .hide-text {
  34. font: 0/0 a;
  35. color: transparent;
  36. text-shadow: none;
  37. background-color: transparent;
  38. border: 0;
  39. }
  40. .input-block-level {
  41. display: block;
  42. width: 100%;
  43. min-height: 30px;
  44. -webkit-box-sizing: border-box;
  45. -moz-box-sizing: border-box;
  46. box-sizing: border-box;
  47. }
  48. .has-switch {
  49. display: inline-block;
  50. cursor: pointer;
  51. -webkit-border-radius: 5px;
  52. -moz-border-radius: 5px;
  53. border-radius: 5px;
  54. border: 1px solid;
  55. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  56. position: relative;
  57. text-align: left;
  58. overflow: hidden;
  59. line-height: 8px;
  60. -webkit-user-select: none;
  61. -moz-user-select: none;
  62. -ms-user-select: none;
  63. -o-user-select: none;
  64. user-select: none;
  65. vertical-align: middle;
  66. min-width: 100px;
  67. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  68. -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  69. -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  70. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  71. }
  72. .has-switch.switch-mini {
  73. min-width: 72px;
  74. }
  75. .has-switch.switch-mini > div > span,
  76. .has-switch.switch-mini > div > label {
  77. padding-bottom: 4px;
  78. padding-top: 4px;
  79. font-size: 10px;
  80. line-height: 9px;
  81. }
  82. .has-switch.switch-mini .switch-mini-icons {
  83. height: 1.20em;
  84. line-height: 9px;
  85. vertical-align: text-top;
  86. text-align: center;
  87. transform: scale(0.6);
  88. margin-top: -1px;
  89. margin-bottom: -1px;
  90. }
  91. .has-switch.switch-small {
  92. min-width: 80px;
  93. }
  94. .has-switch.switch-small > div > span,
  95. .has-switch.switch-small > div > label {
  96. padding-bottom: 3px;
  97. padding-top: 3px;
  98. font-size: 12px;
  99. line-height: 18px;
  100. }
  101. .has-switch.switch-large {
  102. min-width: 120px;
  103. }
  104. .has-switch.switch-large > div > span,
  105. .has-switch.switch-large > div > label {
  106. padding-bottom: 9px;
  107. padding-top: 9px;
  108. font-size: 16px;
  109. line-height: normal;
  110. }
  111. .has-switch.switch-animate > div {
  112. -webkit-transition: left 0.5s;
  113. -moz-transition: left 0.5s;
  114. -o-transition: left 0.5s;
  115. transition: left 0.5s;
  116. }
  117. .has-switch.switch-off > div {
  118. left: -50%;
  119. }
  120. .has-switch.switch-on > div {
  121. left: 0%;
  122. }
  123. .has-switch.disabled {
  124. opacity: 0.5;
  125. filter: alpha(opacity=50);
  126. cursor: default !important;
  127. }
  128. .has-switch.disabled > div > span,
  129. .has-switch.disabled > div > label {
  130. cursor: default !important;
  131. }
  132. .has-switch:focus {
  133. border-color: #0088cc;
  134. outline: 0;
  135. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6);
  136. -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6);
  137. box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6);
  138. }
  139. .has-switch > div {
  140. display: inline-block;
  141. width: 150%;
  142. position: relative;
  143. top: 0;
  144. }
  145. .has-switch > div > span,
  146. .has-switch > div > label {
  147. -webkit-box-sizing: border-box;
  148. -moz-box-sizing: border-box;
  149. box-sizing: border-box;
  150. cursor: pointer;
  151. position: relative;
  152. display: inline-block !important;
  153. height: 100%;
  154. padding-bottom: 4px;
  155. padding-top: 4px;
  156. font-size: 14px;
  157. line-height: 20px;
  158. }
  159. .has-switch > div > span {
  160. text-align: center;
  161. z-index: 1;
  162. width: 33%;
  163. }
  164. .has-switch > div > span.switch-left {
  165. -webkit-border-top-left-radius: 4px;
  166. -moz-border-radius-topleft: 4px;
  167. border-top-left-radius: 4px;
  168. }
  169. .has-switch > div > span.switch-right {
  170. color: #333333;
  171. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  172. background-color: #f0f0f0;
  173. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  174. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  175. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  176. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  177. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  178. background-repeat: repeat-x;
  179. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  180. border-color: #ffffff #ffffff #d9d9d9;
  181. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  182. *background-color: #ffffff;
  183. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  184. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  185. }
  186. .has-switch > div > span.switch-right:hover,
  187. .has-switch > div > span.switch-right:focus,
  188. .has-switch > div > span.switch-right:active,
  189. .has-switch > div > span.switch-right.active,
  190. .has-switch > div > span.switch-right.disabled,
  191. .has-switch > div > span.switch-right[disabled] {
  192. color: #333333;
  193. background-color: #ffffff;
  194. *background-color: #f2f2f2;
  195. }
  196. .has-switch > div > span.switch-right:active,
  197. .has-switch > div > span.switch-right.active {
  198. background-color: #e6e6e6 \9;
  199. }
  200. .has-switch > div > span.switch-primary,
  201. .has-switch > div > span.switch-left {
  202. color: #ffffff;
  203. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  204. background-color: #005fcc;
  205. background-image: -moz-linear-gradient(top, #0044cc, #0088cc);
  206. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc));
  207. background-image: -webkit-linear-gradient(top, #0044cc, #0088cc);
  208. background-image: -o-linear-gradient(top, #0044cc, #0088cc);
  209. background-image: linear-gradient(to bottom, #0044cc, #0088cc);
  210. background-repeat: repeat-x;
  211. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
  212. border-color: #0088cc #0088cc #005580;
  213. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  214. *background-color: #0088cc;
  215. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  216. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  217. }
  218. .has-switch > div > span.switch-primary:hover,
  219. .has-switch > div > span.switch-left:hover,
  220. .has-switch > div > span.switch-primary:focus,
  221. .has-switch > div > span.switch-left:focus,
  222. .has-switch > div > span.switch-primary:active,
  223. .has-switch > div > span.switch-left:active,
  224. .has-switch > div > span.switch-primary.active,
  225. .has-switch > div > span.switch-left.active,
  226. .has-switch > div > span.switch-primary.disabled,
  227. .has-switch > div > span.switch-left.disabled,
  228. .has-switch > div > span.switch-primary[disabled],
  229. .has-switch > div > span.switch-left[disabled] {
  230. color: #ffffff;
  231. background-color: #0088cc;
  232. *background-color: #0077b3;
  233. }
  234. .has-switch > div > span.switch-primary:active,
  235. .has-switch > div > span.switch-left:active,
  236. .has-switch > div > span.switch-primary.active,
  237. .has-switch > div > span.switch-left.active {
  238. background-color: #006699 \9;
  239. }
  240. .has-switch > div > span.switch-info {
  241. color: #ffffff;
  242. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  243. background-color: #41a7c5;
  244. background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
  245. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
  246. background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
  247. background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
  248. background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
  249. background-repeat: repeat-x;
  250. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
  251. border-color: #5bc0de #5bc0de #28a1c5;
  252. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  253. *background-color: #5bc0de;
  254. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  255. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  256. }
  257. .has-switch > div > span.switch-info:hover,
  258. .has-switch > div > span.switch-info:focus,
  259. .has-switch > div > span.switch-info:active,
  260. .has-switch > div > span.switch-info.active,
  261. .has-switch > div > span.switch-info.disabled,
  262. .has-switch > div > span.switch-info[disabled] {
  263. color: #ffffff;
  264. background-color: #5bc0de;
  265. *background-color: #46b8da;
  266. }
  267. .has-switch > div > span.switch-info:active,
  268. .has-switch > div > span.switch-info.active {
  269. background-color: #31b0d5 \9;
  270. }
  271. .has-switch > div > span.switch-success {
  272. color: #ffffff;
  273. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  274. background-color: #58b058;
  275. background-image: -moz-linear-gradient(top, #51a351, #62c462);
  276. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
  277. background-image: -webkit-linear-gradient(top, #51a351, #62c462);
  278. background-image: -o-linear-gradient(top, #51a351, #62c462);
  279. background-image: linear-gradient(to bottom, #51a351, #62c462);
  280. background-repeat: repeat-x;
  281. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
  282. border-color: #62c462 #62c462 #3b9e3b;
  283. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  284. *background-color: #62c462;
  285. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  286. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  287. }
  288. .has-switch > div > span.switch-success:hover,
  289. .has-switch > div > span.switch-success:focus,
  290. .has-switch > div > span.switch-success:active,
  291. .has-switch > div > span.switch-success.active,
  292. .has-switch > div > span.switch-success.disabled,
  293. .has-switch > div > span.switch-success[disabled] {
  294. color: #ffffff;
  295. background-color: #62c462;
  296. *background-color: #4fbd4f;
  297. }
  298. .has-switch > div > span.switch-success:active,
  299. .has-switch > div > span.switch-success.active {
  300. background-color: #42b142 \9;
  301. }
  302. .has-switch > div > span.switch-warning {
  303. color: #ffffff;
  304. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  305. background-color: #f9a123;
  306. background-image: -moz-linear-gradient(top, #f89406, #fbb450);
  307. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
  308. background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
  309. background-image: -o-linear-gradient(top, #f89406, #fbb450);
  310. background-image: linear-gradient(to bottom, #f89406, #fbb450);
  311. background-repeat: repeat-x;
  312. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
  313. border-color: #fbb450 #fbb450 #f89406;
  314. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  315. *background-color: #fbb450;
  316. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  317. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  318. }
  319. .has-switch > div > span.switch-warning:hover,
  320. .has-switch > div > span.switch-warning:focus,
  321. .has-switch > div > span.switch-warning:active,
  322. .has-switch > div > span.switch-warning.active,
  323. .has-switch > div > span.switch-warning.disabled,
  324. .has-switch > div > span.switch-warning[disabled] {
  325. color: #ffffff;
  326. background-color: #fbb450;
  327. *background-color: #faa937;
  328. }
  329. .has-switch > div > span.switch-warning:active,
  330. .has-switch > div > span.switch-warning.active {
  331. background-color: #fa9f1e \9;
  332. }
  333. .has-switch > div > span.switch-danger {
  334. color: #ffffff;
  335. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  336. background-color: #d14641;
  337. background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
  338. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
  339. background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
  340. background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
  341. background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
  342. background-repeat: repeat-x;
  343. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
  344. border-color: #ee5f5b #ee5f5b #e51d18;
  345. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  346. *background-color: #ee5f5b;
  347. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  348. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  349. }
  350. .has-switch > div > span.switch-danger:hover,
  351. .has-switch > div > span.switch-danger:focus,
  352. .has-switch > div > span.switch-danger:active,
  353. .has-switch > div > span.switch-danger.active,
  354. .has-switch > div > span.switch-danger.disabled,
  355. .has-switch > div > span.switch-danger[disabled] {
  356. color: #ffffff;
  357. background-color: #ee5f5b;
  358. *background-color: #ec4844;
  359. }
  360. .has-switch > div > span.switch-danger:active,
  361. .has-switch > div > span.switch-danger.active {
  362. background-color: #e9322d \9;
  363. }
  364. .has-switch > div > span.switch-default {
  365. color: #333333;
  366. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  367. background-color: #f0f0f0;
  368. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  369. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  370. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  371. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  372. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  373. background-repeat: repeat-x;
  374. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  375. border-color: #ffffff #ffffff #d9d9d9;
  376. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  377. *background-color: #ffffff;
  378. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  379. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  380. }
  381. .has-switch > div > span.switch-default:hover,
  382. .has-switch > div > span.switch-default:focus,
  383. .has-switch > div > span.switch-default:active,
  384. .has-switch > div > span.switch-default.active,
  385. .has-switch > div > span.switch-default.disabled,
  386. .has-switch > div > span.switch-default[disabled] {
  387. color: #333333;
  388. background-color: #ffffff;
  389. *background-color: #f2f2f2;
  390. }
  391. .has-switch > div > span.switch-default:active,
  392. .has-switch > div > span.switch-default.active {
  393. background-color: #e6e6e6 \9;
  394. }
  395. .has-switch > div > label {
  396. text-align: center;
  397. margin-top: -1px;
  398. margin-bottom: -1px;
  399. z-index: 100;
  400. width: 34%;
  401. border-left: 1px solid #cccccc;
  402. border-right: 1px solid #cccccc;
  403. color: #333333;
  404. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  405. background-color: #f5f5f5;
  406. background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
  407. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
  408. background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
  409. background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
  410. background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
  411. background-repeat: repeat-x;
  412. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
  413. border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  414. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  415. *background-color: #e6e6e6;
  416. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  417. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  418. }
  419. .has-switch > div > label:hover,
  420. .has-switch > div > label:focus,
  421. .has-switch > div > label:active,
  422. .has-switch > div > label.active,
  423. .has-switch > div > label.disabled,
  424. .has-switch > div > label[disabled] {
  425. color: #333333;
  426. background-color: #e6e6e6;
  427. *background-color: #d9d9d9;
  428. }
  429. .has-switch > div > label:active,
  430. .has-switch > div > label.active {
  431. background-color: #cccccc \9;
  432. }
  433. .has-switch input[type=radio],
  434. .has-switch input[type=checkbox] {
  435. display: none;
  436. }