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.

444 lines
7.9 KiB

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