bootstrap-switch.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. /* ========================================================================
  2. * bootstrap-switch - v2.0.0
  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. }
  68. .has-switch.switch-mini {
  69. min-width: 72px;
  70. }
  71. .has-switch.switch-mini i.switch-mini-icons {
  72. height: 1.20em;
  73. line-height: 9px;
  74. vertical-align: text-top;
  75. text-align: center;
  76. transform: scale(0.6);
  77. margin-top: -1px;
  78. margin-bottom: -1px;
  79. }
  80. .has-switch.switch-small {
  81. min-width: 80px;
  82. }
  83. .has-switch.switch-large {
  84. min-width: 120px;
  85. }
  86. .has-switch.deactivate {
  87. opacity: 0.5;
  88. filter: alpha(opacity=50);
  89. cursor: default !important;
  90. }
  91. .has-switch.deactivate label,
  92. .has-switch.deactivate span {
  93. cursor: default !important;
  94. }
  95. .has-switch > div {
  96. display: inline-block;
  97. width: 150%;
  98. position: relative;
  99. top: 0;
  100. }
  101. .has-switch > div.switch-animate {
  102. -webkit-transition: left 0.5s;
  103. -moz-transition: left 0.5s;
  104. -o-transition: left 0.5s;
  105. transition: left 0.5s;
  106. }
  107. .has-switch > div.switch-off {
  108. left: -50%;
  109. }
  110. .has-switch > div.switch-on {
  111. left: 0%;
  112. }
  113. .has-switch input[type=radio],
  114. .has-switch input[type=checkbox] {
  115. display: none;
  116. }
  117. .has-switch span,
  118. .has-switch label {
  119. -webkit-box-sizing: border-box;
  120. -moz-box-sizing: border-box;
  121. box-sizing: border-box;
  122. cursor: pointer;
  123. position: relative;
  124. display: inline-block;
  125. height: 100%;
  126. padding-bottom: 4px;
  127. padding-top: 4px;
  128. font-size: 14px;
  129. line-height: 20px;
  130. }
  131. .has-switch span.switch-mini,
  132. .has-switch label.switch-mini {
  133. padding-bottom: 4px;
  134. padding-top: 4px;
  135. font-size: 10px;
  136. line-height: 9px;
  137. }
  138. .has-switch span.switch-small,
  139. .has-switch label.switch-small {
  140. padding-bottom: 3px;
  141. padding-top: 3px;
  142. font-size: 12px;
  143. line-height: 18px;
  144. }
  145. .has-switch span.switch-large,
  146. .has-switch label.switch-large {
  147. padding-bottom: 9px;
  148. padding-top: 9px;
  149. font-size: 16px;
  150. line-height: normal;
  151. }
  152. .has-switch label {
  153. text-align: center;
  154. margin-top: -1px;
  155. margin-bottom: -1px;
  156. z-index: 100;
  157. width: 34%;
  158. border-left: 1px solid #cccccc;
  159. border-right: 1px solid #cccccc;
  160. color: #333333;
  161. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  162. background-color: #f5f5f5;
  163. background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
  164. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
  165. background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
  166. background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
  167. background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
  168. background-repeat: repeat-x;
  169. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
  170. border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  171. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  172. *background-color: #e6e6e6;
  173. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  174. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  175. }
  176. .has-switch label:hover,
  177. .has-switch label:focus,
  178. .has-switch label:active,
  179. .has-switch label.active,
  180. .has-switch label.disabled,
  181. .has-switch label[disabled] {
  182. color: #333333;
  183. background-color: #e6e6e6;
  184. *background-color: #d9d9d9;
  185. }
  186. .has-switch label:active,
  187. .has-switch label.active {
  188. background-color: #cccccc \9;
  189. }
  190. .has-switch label i {
  191. color: #000;
  192. text-shadow: 0 1px 0 #fff;
  193. line-height: 18px;
  194. pointer-events: none;
  195. }
  196. .has-switch span {
  197. text-align: center;
  198. z-index: 1;
  199. width: 33%;
  200. }
  201. .has-switch span.switch-left {
  202. -webkit-border-top-left-radius: 4px;
  203. -moz-border-radius-topleft: 4px;
  204. border-top-left-radius: 4px;
  205. -webkit-border-bottom-left-radius: 4px;
  206. -moz-border-radius-bottomleft: 4px;
  207. border-bottom-left-radius: 4px;
  208. }
  209. .has-switch span.switch-right {
  210. color: #333333;
  211. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  212. background-color: #f0f0f0;
  213. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  214. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  215. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  216. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  217. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  218. background-repeat: repeat-x;
  219. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  220. border-color: #ffffff #ffffff #d9d9d9;
  221. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  222. *background-color: #ffffff;
  223. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  224. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  225. }
  226. .has-switch span.switch-right:hover,
  227. .has-switch span.switch-right:focus,
  228. .has-switch span.switch-right:active,
  229. .has-switch span.switch-right.active,
  230. .has-switch span.switch-right.disabled,
  231. .has-switch span.switch-right[disabled] {
  232. color: #333333;
  233. background-color: #ffffff;
  234. *background-color: #f2f2f2;
  235. }
  236. .has-switch span.switch-right:active,
  237. .has-switch span.switch-right.active {
  238. background-color: #e6e6e6 \9;
  239. }
  240. .has-switch span.switch-primary,
  241. .has-switch span.switch-left {
  242. color: #ffffff;
  243. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  244. background-color: #005fcc;
  245. background-image: -moz-linear-gradient(top, #0044cc, #0088cc);
  246. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc));
  247. background-image: -webkit-linear-gradient(top, #0044cc, #0088cc);
  248. background-image: -o-linear-gradient(top, #0044cc, #0088cc);
  249. background-image: linear-gradient(to bottom, #0044cc, #0088cc);
  250. background-repeat: repeat-x;
  251. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
  252. border-color: #0088cc #0088cc #005580;
  253. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  254. *background-color: #0088cc;
  255. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  256. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  257. }
  258. .has-switch span.switch-primary:hover,
  259. .has-switch span.switch-left:hover,
  260. .has-switch span.switch-primary:focus,
  261. .has-switch span.switch-left:focus,
  262. .has-switch span.switch-primary:active,
  263. .has-switch span.switch-left:active,
  264. .has-switch span.switch-primary.active,
  265. .has-switch span.switch-left.active,
  266. .has-switch span.switch-primary.disabled,
  267. .has-switch span.switch-left.disabled,
  268. .has-switch span.switch-primary[disabled],
  269. .has-switch span.switch-left[disabled] {
  270. color: #ffffff;
  271. background-color: #0088cc;
  272. *background-color: #0077b3;
  273. }
  274. .has-switch span.switch-primary:active,
  275. .has-switch span.switch-left:active,
  276. .has-switch span.switch-primary.active,
  277. .has-switch span.switch-left.active {
  278. background-color: #006699 \9;
  279. }
  280. .has-switch span.switch-info {
  281. color: #ffffff;
  282. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  283. background-color: #41a7c5;
  284. background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
  285. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
  286. background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
  287. background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
  288. background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
  289. background-repeat: repeat-x;
  290. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
  291. border-color: #5bc0de #5bc0de #28a1c5;
  292. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  293. *background-color: #5bc0de;
  294. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  295. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  296. }
  297. .has-switch span.switch-info:hover,
  298. .has-switch span.switch-info:focus,
  299. .has-switch span.switch-info:active,
  300. .has-switch span.switch-info.active,
  301. .has-switch span.switch-info.disabled,
  302. .has-switch span.switch-info[disabled] {
  303. color: #ffffff;
  304. background-color: #5bc0de;
  305. *background-color: #46b8da;
  306. }
  307. .has-switch span.switch-info:active,
  308. .has-switch span.switch-info.active {
  309. background-color: #31b0d5 \9;
  310. }
  311. .has-switch span.switch-success {
  312. color: #ffffff;
  313. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  314. background-color: #58b058;
  315. background-image: -moz-linear-gradient(top, #51a351, #62c462);
  316. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
  317. background-image: -webkit-linear-gradient(top, #51a351, #62c462);
  318. background-image: -o-linear-gradient(top, #51a351, #62c462);
  319. background-image: linear-gradient(to bottom, #51a351, #62c462);
  320. background-repeat: repeat-x;
  321. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
  322. border-color: #62c462 #62c462 #3b9e3b;
  323. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  324. *background-color: #62c462;
  325. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  326. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  327. }
  328. .has-switch span.switch-success:hover,
  329. .has-switch span.switch-success:focus,
  330. .has-switch span.switch-success:active,
  331. .has-switch span.switch-success.active,
  332. .has-switch span.switch-success.disabled,
  333. .has-switch span.switch-success[disabled] {
  334. color: #ffffff;
  335. background-color: #62c462;
  336. *background-color: #4fbd4f;
  337. }
  338. .has-switch span.switch-success:active,
  339. .has-switch span.switch-success.active {
  340. background-color: #42b142 \9;
  341. }
  342. .has-switch span.switch-warning {
  343. color: #ffffff;
  344. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  345. background-color: #f9a123;
  346. background-image: -moz-linear-gradient(top, #f89406, #fbb450);
  347. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
  348. background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
  349. background-image: -o-linear-gradient(top, #f89406, #fbb450);
  350. background-image: linear-gradient(to bottom, #f89406, #fbb450);
  351. background-repeat: repeat-x;
  352. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
  353. border-color: #fbb450 #fbb450 #f89406;
  354. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  355. *background-color: #fbb450;
  356. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  357. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  358. }
  359. .has-switch span.switch-warning:hover,
  360. .has-switch span.switch-warning:focus,
  361. .has-switch span.switch-warning:active,
  362. .has-switch span.switch-warning.active,
  363. .has-switch span.switch-warning.disabled,
  364. .has-switch span.switch-warning[disabled] {
  365. color: #ffffff;
  366. background-color: #fbb450;
  367. *background-color: #faa937;
  368. }
  369. .has-switch span.switch-warning:active,
  370. .has-switch span.switch-warning.active {
  371. background-color: #fa9f1e \9;
  372. }
  373. .has-switch span.switch-danger {
  374. color: #ffffff;
  375. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  376. background-color: #d14641;
  377. background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
  378. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
  379. background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
  380. background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
  381. background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
  382. background-repeat: repeat-x;
  383. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
  384. border-color: #ee5f5b #ee5f5b #e51d18;
  385. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  386. *background-color: #ee5f5b;
  387. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  388. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  389. }
  390. .has-switch span.switch-danger:hover,
  391. .has-switch span.switch-danger:focus,
  392. .has-switch span.switch-danger:active,
  393. .has-switch span.switch-danger.active,
  394. .has-switch span.switch-danger.disabled,
  395. .has-switch span.switch-danger[disabled] {
  396. color: #ffffff;
  397. background-color: #ee5f5b;
  398. *background-color: #ec4844;
  399. }
  400. .has-switch span.switch-danger:active,
  401. .has-switch span.switch-danger.active {
  402. background-color: #e9322d \9;
  403. }
  404. .has-switch span.switch-default {
  405. color: #333333;
  406. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  407. background-color: #f0f0f0;
  408. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  409. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  410. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  411. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  412. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  413. background-repeat: repeat-x;
  414. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  415. border-color: #ffffff #ffffff #d9d9d9;
  416. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  417. *background-color: #ffffff;
  418. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  419. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  420. }
  421. .has-switch span.switch-default:hover,
  422. .has-switch span.switch-default:focus,
  423. .has-switch span.switch-default:active,
  424. .has-switch span.switch-default.active,
  425. .has-switch span.switch-default.disabled,
  426. .has-switch span.switch-default[disabled] {
  427. color: #333333;
  428. background-color: #ffffff;
  429. *background-color: #f2f2f2;
  430. }
  431. .has-switch span.switch-default:active,
  432. .has-switch span.switch-default.active {
  433. background-color: #e6e6e6 \9;
  434. }