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.

377 lines
7.1 KiB

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