bootstrap-switch.css 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /* ========================================================================
  2. * bootstrap-switch - v3.1.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. .bootstrap-switch {
  22. display: inline-block;
  23. cursor: pointer;
  24. border-radius: 4px;
  25. border: 1px solid;
  26. border-color: #cccccc;
  27. position: relative;
  28. text-align: left;
  29. overflow: hidden;
  30. line-height: 8px;
  31. -webkit-user-select: none;
  32. -moz-user-select: none;
  33. -ms-user-select: none;
  34. user-select: none;
  35. vertical-align: middle;
  36. min-width: 100px;
  37. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  38. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  39. }
  40. .bootstrap-switch.bootstrap-switch-mini {
  41. min-width: 71px;
  42. }
  43. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
  44. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
  45. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
  46. padding-bottom: 4px;
  47. padding-top: 4px;
  48. font-size: 10px;
  49. line-height: 9px;
  50. }
  51. .bootstrap-switch.bootstrap-switch-small {
  52. min-width: 79px;
  53. }
  54. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
  55. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
  56. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
  57. padding-bottom: 3px;
  58. padding-top: 3px;
  59. font-size: 12px;
  60. line-height: 18px;
  61. }
  62. .bootstrap-switch.bootstrap-switch-large {
  63. min-width: 120px;
  64. }
  65. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
  66. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
  67. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
  68. padding-bottom: 9px;
  69. padding-top: 9px;
  70. font-size: 16px;
  71. line-height: normal;
  72. }
  73. .bootstrap-switch.bootstrap-switch-disabled,
  74. .bootstrap-switch.bootstrap-switch-readonly,
  75. .bootstrap-switch.bootstrap-switch-indeterminate {
  76. opacity: 0.5;
  77. filter: alpha(opacity=50);
  78. cursor: default !important;
  79. }
  80. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
  81. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
  82. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
  83. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
  84. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
  85. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
  86. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
  87. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
  88. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
  89. cursor: default !important;
  90. }
  91. .bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
  92. -webkit-transition: margin-left 0.5s;
  93. transition: margin-left 0.5s;
  94. }
  95. .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
  96. border-bottom-left-radius: 0;
  97. border-top-left-radius: 0;
  98. border-bottom-right-radius: 3px;
  99. border-top-right-radius: 3px;
  100. }
  101. .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
  102. border-bottom-right-radius: 0;
  103. border-top-right-radius: 0;
  104. border-bottom-left-radius: 3px;
  105. border-top-left-radius: 3px;
  106. }
  107. .bootstrap-switch.bootstrap-switch-focused {
  108. border-color: #66afe9;
  109. outline: 0;
  110. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  111. box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  112. }
  113. .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container,
  114. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-container {
  115. margin-left: 0%;
  116. }
  117. .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
  118. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
  119. border-bottom-right-radius: 3px;
  120. border-top-right-radius: 3px;
  121. }
  122. .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container,
  123. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-container {
  124. margin-left: -50%;
  125. }
  126. .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
  127. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
  128. border-bottom-left-radius: 3px;
  129. border-top-left-radius: 3px;
  130. }
  131. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container,
  132. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-indeterminate .bootstrap-switch-container {
  133. margin-left: -25%;
  134. }
  135. .bootstrap-switch .bootstrap-switch-container {
  136. display: inline-block;
  137. width: 150%;
  138. top: 0;
  139. border-radius: 4px;
  140. -webkit-transform: translate3d(0, 0, 0);
  141. transform: translate3d(0, 0, 0);
  142. }
  143. .bootstrap-switch .bootstrap-switch-handle-on,
  144. .bootstrap-switch .bootstrap-switch-handle-off,
  145. .bootstrap-switch .bootstrap-switch-label {
  146. -webkit-box-sizing: border-box;
  147. -moz-box-sizing: border-box;
  148. box-sizing: border-box;
  149. cursor: pointer;
  150. display: inline-block !important;
  151. height: 100%;
  152. padding-bottom: 4px;
  153. padding-top: 4px;
  154. font-size: 14px;
  155. line-height: 20px;
  156. }
  157. .bootstrap-switch .bootstrap-switch-handle-on,
  158. .bootstrap-switch .bootstrap-switch-handle-off {
  159. text-align: center;
  160. z-index: 1;
  161. width: 33.333333333%;
  162. }
  163. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
  164. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
  165. color: #fff;
  166. background: #428bca;
  167. }
  168. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
  169. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
  170. color: #fff;
  171. background: #5bc0de;
  172. }
  173. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
  174. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
  175. color: #fff;
  176. background: #5cb85c;
  177. }
  178. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
  179. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
  180. background: #f0ad4e;
  181. color: #fff;
  182. }
  183. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
  184. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
  185. color: #fff;
  186. background: #d9534f;
  187. }
  188. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
  189. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
  190. color: #000;
  191. background: #eeeeee;
  192. }
  193. .bootstrap-switch .bootstrap-switch-label {
  194. text-align: center;
  195. margin-top: -1px;
  196. margin-bottom: -1px;
  197. z-index: 100;
  198. width: 33.333333333%;
  199. color: #333333;
  200. background: #ffffff;
  201. }
  202. .bootstrap-switch .bootstrap-switch-handle-on {
  203. border-bottom-left-radius: 3px;
  204. border-top-left-radius: 3px;
  205. }
  206. .bootstrap-switch .bootstrap-switch-handle-off {
  207. border-bottom-right-radius: 3px;
  208. border-top-right-radius: 3px;
  209. }
  210. .bootstrap-switch input[type='radio'],
  211. .bootstrap-switch input[type='checkbox'] {
  212. position: absolute !important;
  213. top: 0;
  214. left: 0;
  215. opacity: 0;
  216. filter: alpha(opacity=0);
  217. z-index: -1;
  218. }
  219. .bootstrap-switch input[type='radio'].form-control,
  220. .bootstrap-switch input[type='checkbox'].form-control {
  221. height: auto;
  222. }