bootstrap-switch.css 16 KB

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