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.

300 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. cursor: pointer;
  140. width: 3em;
  141. height: 2em;
  142. }
  143. /* Line */
  144. .ui.slider.checkbox:after {
  145. position: absolute;
  146. top: 1em;
  147. left: 0em;
  148. content: '';
  149. width: 100%;
  150. height: 2px;
  151. background-color: rgba(0, 0, 0, 0.1);
  152. }
  153. /* Button */
  154. .ui.slider.checkbox .box,
  155. .ui.slider.checkbox label {
  156. cursor: pointer;
  157. display: block;
  158. position: absolute;
  159. top: 0.25em;
  160. left: 0;
  161. z-index: 1;
  162. width: 1.5em;
  163. height: 1.5em;
  164. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  165. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  166. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  167. border-radius: 50rem;
  168. -webkit-transition: left 0.3s ease 0s;
  169. -moz-transition: left 0.3s ease 0s;
  170. -o-transition: left 0.3s ease 0s;
  171. -ms-transition: left 0.3s ease 0s;
  172. transition: left 0.3s ease 0s;
  173. }
  174. /* Button Activation Light */
  175. .ui.slider.checkbox .box:after,
  176. .ui.slider.checkbox label:after {
  177. opacity: 1;
  178. position: absolute;
  179. content: '';
  180. top: 0.375em;
  181. left: 0.375em;
  182. border: none;
  183. width: 0.75em;
  184. height: 0.75em;
  185. background-color: #D95C5C;
  186. border-radius: 50rem;
  187. -webkit-transition: background 0.3s ease 0s;
  188. -moz-transition: background 0.3s ease 0s;
  189. -o-transition: background 0.3s ease 0s;
  190. -ms-transition: background 0.3s ease 0s;
  191. transition: background 0.3s ease 0s;
  192. }
  193. /* Active Slider Toggle */
  194. .ui.slider.checkbox input:checked + .box,
  195. .ui.slider.checkbox input:checked + label {
  196. left: 1.75em;
  197. }
  198. .ui.slider.checkbox input:checked + .box:after,
  199. .ui.slider.checkbox input:checked + label:after {
  200. background-color: #89B84C;
  201. }
  202. /*--------------
  203. Toggle
  204. ---------------*/
  205. .ui.toggle.checkbox {
  206. cursor: pointer;
  207. width: 3em;
  208. height: 2em;
  209. }
  210. /* Line */
  211. .ui.toggle.checkbox:after {
  212. cursor: pointer;
  213. display: block;
  214. position: absolute;
  215. content: '';
  216. top: 0.25em;
  217. left: 0em;
  218. z-index: 1;
  219. background-color: #FFFFFF;
  220. width: 100%;
  221. height: 1.5em;
  222. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  223. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  224. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset;
  225. border-radius: 50rem;
  226. }
  227. .ui.toggle.checkbox .box,
  228. .ui.toggle.checkbox label {
  229. position: absolute;
  230. top: 0.65em;
  231. left: 0.5em;
  232. -webkit-transition: left 0.3s ease 0s;
  233. -moz-transition: left 0.3s ease 0s;
  234. -o-transition: left 0.3s ease 0s;
  235. -ms-transition: left 0.3s ease 0s;
  236. transition: left 0.3s ease 0s;
  237. background-color: transparent;
  238. -webkit-box-shadow: none;
  239. -moz-box-shadow: none;
  240. box-shadow: none;
  241. }
  242. /* Button Activation Light */
  243. .ui.toggle.checkbox .box:after,
  244. .ui.toggle.checkbox label:after {
  245. opacity: 1;
  246. content: '';
  247. position: absolute;
  248. top: 0px;
  249. left: 0px;
  250. z-index: 2;
  251. border: none;
  252. width: 0.75em;
  253. height: 0.75em;
  254. background-color: #D95C5C;
  255. border-radius: 50rem;
  256. -webkit-transition: background 0.3s ease 0s;
  257. -moz-transition: background 0.3s ease 0s;
  258. -o-transition: background 0.3s ease 0s;
  259. -ms-transition: background 0.3s ease 0s;
  260. transition: background 0.3s ease 0s;
  261. }
  262. /* Active toggle Toggle */
  263. .ui.toggle.checkbox input:checked + .box,
  264. .ui.toggle.checkbox input:checked + label {
  265. left: 1.75em;
  266. }
  267. .ui.toggle.checkbox input:checked + .box:after,
  268. .ui.toggle.checkbox input:checked + label:after {
  269. background-color: #89B84C;
  270. }
  271. /*--------------
  272. Sizes
  273. ---------------*/
  274. .ui.checkbox {
  275. width: 1em;
  276. height: 1em;
  277. }
  278. .ui.checkbox,
  279. .ui.checkbox .box,
  280. .ui.checkbox label {
  281. font-size: 1em;
  282. }
  283. .ui.large.checkbox {
  284. width: 1.25em;
  285. height: 1.25em;
  286. }
  287. .ui.large.checkbox,
  288. .ui.large.checkbox .box,
  289. .ui.large.checkbox label {
  290. font-size: 1.25em;
  291. }
  292. .ui.huge.checkbox {
  293. width: 1.5em;
  294. height: 1.5em;
  295. }
  296. .ui.huge.checkbox,
  297. .ui.huge.checkbox .box,
  298. .ui.huge.checkbox label {
  299. font-size: 1.5em;
  300. }