bootstrap-switch.css 16 KB

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