You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

450 lines
7.7 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. /*
  2. * # Semantic - Checkbox
  3. * http://github.com/jlukic/semantic-ui/
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Checkbox
  13. *******************************/
  14. /*--------------
  15. Standard
  16. ---------------*/
  17. /*--- Content ---*/
  18. .ui.checkbox {
  19. position: relative;
  20. display: inline-block;
  21. min-width: 1em;
  22. min-height: 1.25em;
  23. line-height: 1em;
  24. outline: none;
  25. vertical-align: middle;
  26. }
  27. .ui.checkbox input {
  28. position: absolute;
  29. top: 0px;
  30. right: 0px;
  31. opacity: 0;
  32. outline: none;
  33. }
  34. /*--- Box ---*/
  35. .ui.checkbox .box,
  36. .ui.checkbox label {
  37. cursor: pointer;
  38. padding-right: 2em;
  39. outline: none;
  40. }
  41. .ui.checkbox .box:before,
  42. .ui.checkbox label:before {
  43. position: absolute;
  44. top: 0em;
  45. right: 0em;
  46. line-height: 1;
  47. width: 1em;
  48. height: 1em;
  49. right: 0em;
  50. content: '';
  51. border-radius: 4px;
  52. background: #FFFFFF;
  53. -webkit-transition:
  54. background-color 0.3s ease,
  55. -webkit-box-shadow 0.3s ease;
  56. -moz-transition:
  57. background-color 0.3s ease,
  58. box-shadow 0.3s ease
  59. ;
  60. transition:
  61. background-color 0.3s ease,
  62. box-shadow 0.3s ease
  63. ;
  64. -webkit-box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.2);
  65. box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.2);
  66. }
  67. /*--- Checkbox ---*/
  68. .ui.checkbox .box:after,
  69. .ui.checkbox label:after {
  70. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  71. filter: alpha(opacity=0);
  72. opacity: 0;
  73. content: '';
  74. position: absolute;
  75. background: transparent;
  76. border: 0.2em solid #333333;
  77. border-top: none;
  78. border-left: none;
  79. -webkit-transform: rotate(-45deg);
  80. -moz-transform: rotate(-45deg);
  81. -ms-transform: rotate(-45deg);
  82. transform: rotate(-45deg);
  83. }
  84. .ui.checkbox .box:after,
  85. .ui.checkbox label:after {
  86. top: 0.275em;
  87. right: 0.2em;
  88. width: 0.45em;
  89. height: 0.15em;
  90. }
  91. /*--- Inside Label ---*/
  92. .ui.checkbox label {
  93. display: block;
  94. color: rgba(0, 0, 0, 0.6);
  95. -webkit-transition: color 0.2s ease;
  96. -moz-transition: color 0.2s ease;
  97. transition: color 0.2s ease;
  98. }
  99. .ui.checkbox label:hover {
  100. color: rgba(0, 0, 0, 0.8);
  101. }
  102. .ui.checkbox input:focus ~ label {
  103. color: rgba(0, 0, 0, 0.8);
  104. }
  105. /*--- Outside Label ---*/
  106. .ui.checkbox ~ label {
  107. cursor: pointer;
  108. opacity: 0.85;
  109. vertical-align: middle;
  110. }
  111. .ui.checkbox ~ label:hover {
  112. opacity: 1;
  113. }
  114. /*******************************
  115. States
  116. *******************************/
  117. /*--- Hover ---*/
  118. .ui.checkbox .box:hover::before,
  119. .ui.checkbox label:hover::before {
  120. -webkit-box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.3);
  121. box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.3);
  122. }
  123. /*--- Down ---*/
  124. .ui.checkbox .box:active::before,
  125. .ui.checkbox label:active::before {
  126. background-color: #F5F5F5;
  127. }
  128. /*--- Focus ---*/
  129. .ui.checkbox input:focus ~ .box:before,
  130. .ui.checkbox input:focus ~ label:before {
  131. -webkit-box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.3);
  132. box-shadow: 0em 0em 0em 1px rgba(0, 0, 0, 0.3);
  133. }
  134. /*--- Active ---*/
  135. .ui.checkbox input:checked ~ .box:after,
  136. .ui.checkbox input:checked ~ label:after {
  137. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
  138. filter: alpha(opacity=100);
  139. opacity: 1;
  140. }
  141. /*--- Disabled ---*/
  142. .ui.disabled.checkbox ~ .box:after,
  143. .ui.checkbox input[disabled] ~ .box:after,
  144. .ui.disabled.checkbox label,
  145. .ui.checkbox input[disabled] ~ label {
  146. opacity: 0.4;
  147. color: rgba(0, 0, 0, 0.3);
  148. }
  149. /*******************************
  150. Variations
  151. *******************************/
  152. /*--------------
  153. Radio
  154. ---------------*/
  155. .ui.radio.checkbox .box:before,
  156. .ui.radio.checkbox label:before {
  157. min-width: 1em;
  158. height: 1em;
  159. border-radius: 500px;
  160. -webkit-transform: none;
  161. -moz-transform: none;
  162. -ms-transform: none;
  163. transform: none;
  164. }
  165. .ui.radio.checkbox .box:after,
  166. .ui.radio.checkbox label:after {
  167. border: none;
  168. top: 0.2em;
  169. right: 0.2em;
  170. width: 0.6em;
  171. height: 0.6em;
  172. background-color: #555555;
  173. -webkit-transform: none;
  174. -moz-transform: none;
  175. -ms-transform: none;
  176. transform: none;
  177. border-radius: 500px;
  178. }
  179. /*--------------
  180. Slider
  181. ---------------*/
  182. .ui.slider.checkbox {
  183. cursor: pointer;
  184. min-width: 3em;
  185. }
  186. /* Line */
  187. .ui.slider.checkbox:after {
  188. position: absolute;
  189. top: 0.5em;
  190. right: 0em;
  191. content: '';
  192. width: 3em;
  193. height: 2px;
  194. background-color: rgba(0, 0, 0, 0.1);
  195. }
  196. /* Button */
  197. .ui.slider.checkbox .box,
  198. .ui.slider.checkbox label {
  199. padding-right: 4em;
  200. }
  201. .ui.slider.checkbox .box:before,
  202. .ui.slider.checkbox label:before {
  203. cursor: pointer;
  204. display: block;
  205. position: absolute;
  206. top: -0.25em;
  207. right: 0em;
  208. z-index: 1;
  209. width: 1.5em;
  210. height: 1.5em;
  211. -webkit-transform: none;
  212. -moz-transform: none;
  213. -ms-transform: none;
  214. transform: none;
  215. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  216. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  217. border-radius: 50rem;
  218. -webkit-transition: right 0.3s ease 0s;
  219. -moz-transition: right 0.3s ease 0s;
  220. transition: right 0.3s ease 0s;
  221. }
  222. /* Button Activation Light */
  223. .ui.slider.checkbox .box:after,
  224. .ui.slider.checkbox label:after {
  225. opacity: 1;
  226. position: absolute;
  227. content: '';
  228. top: 0.15em;
  229. right: 0em;
  230. z-index: 2;
  231. margin-right: 0.375em;
  232. border: none;
  233. width: 0.75em;
  234. height: 0.75em;
  235. border-radius: 50rem;
  236. -webkit-transform: none;
  237. -moz-transform: none;
  238. -ms-transform: none;
  239. transform: none;
  240. -webkit-transition:
  241. background 0.3s ease 0s,
  242. right 0.3s ease 0s
  243. ;
  244. -moz-transition:
  245. background 0.3s ease 0s,
  246. right 0.3s ease 0s
  247. ;
  248. transition:
  249. background 0.3s ease 0s,
  250. right 0.3s ease 0s
  251. ;
  252. }
  253. /* Selected Slider Toggle */
  254. .ui.slider.checkbox input:checked ~ .box:before,
  255. .ui.slider.checkbox input:checked ~ label:before,
  256. .ui.slider.checkbox input:checked ~ .box:after,
  257. .ui.slider.checkbox input:checked ~ label:after {
  258. right: 1.75em;
  259. }
  260. /* Off Color */
  261. .ui.slider.checkbox .box:after,
  262. .ui.slider.checkbox label:after {
  263. background-color: #D95C5C;
  264. }
  265. /* On Color */
  266. .ui.slider.checkbox input:checked ~ .box:after,
  267. .ui.slider.checkbox input:checked ~ label:after {
  268. background-color: #89B84C;
  269. }
  270. /*--------------
  271. Toggle
  272. ---------------*/
  273. .ui.toggle.checkbox {
  274. cursor: pointer;
  275. }
  276. .ui.toggle.checkbox .box,
  277. .ui.toggle.checkbox label {
  278. padding-right: 4em;
  279. }
  280. /* Switch */
  281. .ui.toggle.checkbox .box:before,
  282. .ui.toggle.checkbox label:before {
  283. cursor: pointer;
  284. display: block;
  285. position: absolute;
  286. content: '';
  287. top: -0.25em;
  288. right: 0em;
  289. z-index: 1;
  290. background-color: #FFFFFF;
  291. width: 3em;
  292. height: 1.5em;
  293. -webkit-transform: none;
  294. -moz-transform: none;
  295. -ms-transform: none;
  296. transform: none;
  297. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  298. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  299. border-radius: 50rem;
  300. }
  301. /* Activation Light */
  302. .ui.toggle.checkbox .box:after,
  303. .ui.toggle.checkbox label:after {
  304. opacity: 1;
  305. background-color: transparent;
  306. -webkit-box-shadow: none;
  307. box-shadow: none;
  308. content: '';
  309. position: absolute;
  310. top: 0.15em;
  311. right: 0.5em;
  312. z-index: 2;
  313. border: none;
  314. width: 0.75em;
  315. height: 0.75em;
  316. background-color: #D95C5C;
  317. border-radius: 50rem;
  318. -webkit-transition:
  319. background 0.3s ease 0s,
  320. right 0.3s ease 0s
  321. ;
  322. -moz-transition:
  323. background 0.3s ease 0s,
  324. right 0.3s ease 0s
  325. ;
  326. transition:
  327. background 0.3s ease 0s,
  328. right 0.3s ease 0s
  329. ;
  330. }
  331. /* Active */
  332. .ui.toggle.checkbox:active .box:before,
  333. .ui.toggle.checkbox:active label:before {
  334. background-color: #F5F5F5;
  335. }
  336. /* Active */
  337. .ui.toggle.checkbox input:checked ~ .box:after,
  338. .ui.toggle.checkbox input:checked ~ label:after {
  339. right: 1.75em;
  340. background-color: #89B84C;
  341. }
  342. /*--------------
  343. Sizes
  344. ---------------*/
  345. .ui.checkbox {
  346. font-size: 1em;
  347. }
  348. .ui.large.checkbox {
  349. font-size: 1.25em;
  350. }
  351. .ui.huge.checkbox {
  352. font-size: 1.5em;
  353. }