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.

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