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.

585 lines
12 KiB

  1. /*!
  2. * # Semantic UI 2.1.6 - Checkbox
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2015 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Checkbox
  13. *******************************/
  14. /*--------------
  15. Content
  16. ---------------*/
  17. .ui.checkbox {
  18. position: relative;
  19. display: inline-block;
  20. -webkit-backface-visibility: hidden;
  21. backface-visibility: hidden;
  22. outline: none;
  23. vertical-align: baseline;
  24. font-style: normal;
  25. min-height: 17px;
  26. font-size: 1rem;
  27. line-height: 17px;
  28. min-width: 17px;
  29. }
  30. /* HTML Checkbox */
  31. .ui.checkbox input[type="checkbox"],
  32. .ui.checkbox input[type="radio"] {
  33. cursor: pointer;
  34. position: absolute;
  35. top: 0px;
  36. left: 0px;
  37. opacity: 0 !important;
  38. outline: none;
  39. z-index: 3;
  40. width: 17px;
  41. height: 17px;
  42. }
  43. /*--------------
  44. Box
  45. ---------------*/
  46. .ui.checkbox .box,
  47. .ui.checkbox label {
  48. cursor: auto;
  49. position: relative;
  50. display: block;
  51. padding-left: 1.85714em;
  52. outline: none;
  53. font-size: 1em;
  54. }
  55. .ui.checkbox .box:before,
  56. .ui.checkbox label:before {
  57. position: absolute;
  58. top: 0px;
  59. left: 0px;
  60. width: 17px;
  61. height: 17px;
  62. content: '';
  63. background: #FFFFFF;
  64. border-radius: 0.23076923rem;
  65. -webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, box-shadow 0.1s ease;
  66. transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
  67. border: 1px solid #DDDDDD;
  68. }
  69. /*--------------
  70. Checkmark
  71. ---------------*/
  72. .ui.checkbox .box:after,
  73. .ui.checkbox label:after {
  74. position: absolute;
  75. font-size: 14px;
  76. top: 0px;
  77. left: 0px;
  78. width: 17px;
  79. height: 17px;
  80. text-align: center;
  81. opacity: 0;
  82. color: rgba(0, 0, 0, 0.87);
  83. -webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, box-shadow 0.1s ease;
  84. transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
  85. }
  86. /*--------------
  87. Label
  88. ---------------*/
  89. /* Inside */
  90. .ui.checkbox label,
  91. .ui.checkbox + label {
  92. color: rgba(0, 0, 0, 0.87);
  93. -webkit-transition: color 0.1s ease;
  94. transition: color 0.1s ease;
  95. }
  96. /* Outside */
  97. .ui.checkbox + label {
  98. vertical-align: middle;
  99. }
  100. /*******************************
  101. States
  102. *******************************/
  103. /*--------------
  104. Hover
  105. ---------------*/
  106. .ui.checkbox .box:hover::before,
  107. .ui.checkbox label:hover::before {
  108. background: #FFFFFF;
  109. border-color: #51A7E8;
  110. }
  111. .ui.checkbox label:hover,
  112. .ui.checkbox + label:hover {
  113. color: rgba(0, 0, 0, 0.8);
  114. }
  115. /*--------------
  116. Down
  117. ---------------*/
  118. .ui.checkbox .box:active::before,
  119. .ui.checkbox label:active::before {
  120. background: #F9FAFB;
  121. border-color: #51A7E8;
  122. }
  123. .ui.checkbox .box:active::after,
  124. .ui.checkbox label:active::after {
  125. color: rgba(0, 0, 0, 0.95);
  126. }
  127. .ui.checkbox input:active ~ label {
  128. color: rgba(0, 0, 0, 0.95);
  129. }
  130. /*--------------
  131. Focus
  132. ---------------*/
  133. .ui.checkbox input:focus ~ .box:before,
  134. .ui.checkbox input:focus ~ label:before {
  135. background: #FFFFFF;
  136. border-color: #96C8DA;
  137. }
  138. .ui.checkbox input:focus ~ .box:after,
  139. .ui.checkbox input:focus ~ label:after {
  140. color: rgba(0, 0, 0, 0.95);
  141. }
  142. .ui.checkbox input:focus ~ label {
  143. color: rgba(0, 0, 0, 0.95);
  144. }
  145. /*--------------
  146. Active
  147. ---------------*/
  148. .ui.checkbox input:checked ~ .box:before,
  149. .ui.checkbox input:checked ~ label:before {
  150. background: #FFFFFF;
  151. border-color: #51A7E8;
  152. }
  153. .ui.checkbox input:checked ~ .box:after,
  154. .ui.checkbox input:checked ~ label:after {
  155. opacity: 1;
  156. color: rgba(0, 0, 0, 0.95);
  157. }
  158. /*--------------
  159. Indeterminate
  160. ---------------*/
  161. .ui.checkbox input:indeterminate ~ .box:before,
  162. .ui.checkbox input:indeterminate ~ label:before {
  163. background: #FFFFFF;
  164. border-color: #51A7E8;
  165. }
  166. .ui.checkbox input:indeterminate ~ .box:after,
  167. .ui.checkbox input:indeterminate ~ label:after {
  168. opacity: 1;
  169. color: rgba(0, 0, 0, 0.95);
  170. }
  171. /*--------------
  172. Active Focus
  173. ---------------*/
  174. .ui.checkbox input:indeterminate:focus ~ .box:before,
  175. .ui.checkbox input:indeterminate:focus ~ label:before,
  176. .ui.checkbox input:checked:focus ~ .box:before,
  177. .ui.checkbox input:checked:focus ~ label:before {
  178. background: #FFFFFF;
  179. border-color: #96C8DA;
  180. }
  181. .ui.checkbox input:indeterminate:focus ~ .box:after,
  182. .ui.checkbox input:indeterminate:focus ~ label:after,
  183. .ui.checkbox input:checked:focus ~ .box:after,
  184. .ui.checkbox input:checked:focus ~ label:after {
  185. color: rgba(0, 0, 0, 0.95);
  186. }
  187. /*--------------
  188. Read-Only
  189. ---------------*/
  190. .ui.read-only.checkbox,
  191. .ui.read-only.checkbox label {
  192. cursor: default;
  193. }
  194. /*--------------
  195. Disabled
  196. ---------------*/
  197. .ui.disabled.checkbox .box:after,
  198. .ui.disabled.checkbox label,
  199. .ui.checkbox input[disabled] ~ .box:after,
  200. .ui.checkbox input[disabled] ~ label {
  201. cursor: default;
  202. opacity: 0.5;
  203. color: #000000;
  204. }
  205. /*--------------
  206. Hidden
  207. ---------------*/
  208. /* Initialized checkbox moves input below element
  209. to prevent manually triggering */
  210. .ui.checkbox input.hidden {
  211. z-index: -1;
  212. }
  213. /* Selectable Label */
  214. .ui.checkbox input.hidden + label {
  215. cursor: pointer;
  216. -webkit-user-select: none;
  217. -moz-user-select: none;
  218. -ms-user-select: none;
  219. user-select: none;
  220. }
  221. /*******************************
  222. Types
  223. *******************************/
  224. /*--------------
  225. Radio
  226. ---------------*/
  227. .ui.radio.checkbox {
  228. min-height: 15px;
  229. }
  230. .ui.radio.checkbox .box,
  231. .ui.radio.checkbox label {
  232. padding-left: 1.85714em;
  233. }
  234. /* Box */
  235. .ui.radio.checkbox .box:before,
  236. .ui.radio.checkbox label:before {
  237. content: '';
  238. -webkit-transform: none;
  239. transform: none;
  240. width: 15px;
  241. height: 15px;
  242. border-radius: 500rem;
  243. top: 1px;
  244. left: 0px;
  245. }
  246. /* Bullet */
  247. .ui.radio.checkbox .box:after,
  248. .ui.radio.checkbox label:after {
  249. border: none;
  250. content: '' !important;
  251. width: 15px;
  252. height: 15px;
  253. line-height: 15px;
  254. }
  255. /* Radio Checkbox */
  256. .ui.radio.checkbox .box:after,
  257. .ui.radio.checkbox label:after {
  258. top: 1px;
  259. left: 0px;
  260. width: 15px;
  261. height: 15px;
  262. border-radius: 500rem;
  263. -webkit-transform: scale(0.46666667);
  264. transform: scale(0.46666667);
  265. background-color: rgba(0, 0, 0, 0.87);
  266. }
  267. /* Focus */
  268. .ui.radio.checkbox input:focus ~ .box:before,
  269. .ui.radio.checkbox input:focus ~ label:before {
  270. background-color: #FFFFFF;
  271. }
  272. .ui.radio.checkbox input:focus ~ .box:after,
  273. .ui.radio.checkbox input:focus ~ label:after {
  274. background-color: rgba(0, 0, 0, 0.95);
  275. }
  276. /* Indeterminate */
  277. .ui.radio.checkbox input:indeterminate ~ .box:after,
  278. .ui.radio.checkbox input:indeterminate ~ label:after {
  279. opacity: 0;
  280. }
  281. /* Active */
  282. .ui.radio.checkbox input:checked ~ .box:before,
  283. .ui.radio.checkbox input:checked ~ label:before {
  284. background-color: #FFFFFF;
  285. }
  286. .ui.radio.checkbox input:checked ~ .box:after,
  287. .ui.radio.checkbox input:checked ~ label:after {
  288. background-color: rgba(0, 0, 0, 0.95);
  289. }
  290. /* Active Focus */
  291. .ui.radio.checkbox input:focus:checked ~ .box:before,
  292. .ui.radio.checkbox input:focus:checked ~ label:before {
  293. background-color: #FFFFFF;
  294. }
  295. .ui.radio.checkbox input:focus:checked ~ .box:after,
  296. .ui.radio.checkbox input:focus:checked ~ label:after {
  297. background-color: rgba(0, 0, 0, 0.95);
  298. }
  299. /*--------------
  300. Slider
  301. ---------------*/
  302. .ui.slider.checkbox {
  303. min-height: 1.25rem;
  304. }
  305. /* Input */
  306. .ui.slider.checkbox input {
  307. width: 3.5rem;
  308. height: 1.25rem;
  309. }
  310. /* Label */
  311. .ui.slider.checkbox .box,
  312. .ui.slider.checkbox label {
  313. padding-left: 4.5rem;
  314. line-height: 1rem;
  315. color: rgba(0, 0, 0, 0.4);
  316. }
  317. /* Line */
  318. .ui.slider.checkbox .box:before,
  319. .ui.slider.checkbox label:before {
  320. display: block;
  321. position: absolute;
  322. content: '';
  323. border: none !important;
  324. left: 0em;
  325. z-index: 1;
  326. top: 0.4rem;
  327. background-color: rgba(0, 0, 0, 0.05);
  328. width: 3.5rem;
  329. height: 0.23076923rem;
  330. -webkit-transform: none;
  331. transform: none;
  332. border-radius: 500rem;
  333. -webkit-transition: background 0.3s ease;
  334. transition: background 0.3s ease;
  335. }
  336. /* Handle */
  337. .ui.slider.checkbox .box:after,
  338. .ui.slider.checkbox label:after {
  339. background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  340. background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  341. position: absolute;
  342. content: '' !important;
  343. opacity: 1;
  344. z-index: 2;
  345. border: none;
  346. box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.13), 0px 0px 0px 1px rgba(0, 0, 0, 0.13) inset;
  347. width: 1.5rem;
  348. height: 1.5rem;
  349. top: -0.25rem;
  350. left: 0em;
  351. -webkit-transform: none;
  352. transform: none;
  353. border-radius: 500rem;
  354. -webkit-transition: left 0.3s ease;
  355. transition: left 0.3s ease;
  356. }
  357. /* Focus */
  358. .ui.slider.checkbox input:focus ~ .box:before,
  359. .ui.slider.checkbox input:focus ~ label:before {
  360. background-color: rgba(0, 0, 0, 0.15);
  361. border: none;
  362. }
  363. /* Hover */
  364. .ui.slider.checkbox .box:hover,
  365. .ui.slider.checkbox label:hover {
  366. color: rgba(0, 0, 0, 0.8);
  367. }
  368. .ui.slider.checkbox .box:hover::before,
  369. .ui.slider.checkbox label:hover::before {
  370. background: rgba(0, 0, 0, 0.15);
  371. }
  372. /* Active */
  373. .ui.slider.checkbox input:checked ~ .box,
  374. .ui.slider.checkbox input:checked ~ label {
  375. color: rgba(0, 0, 0, 0.95) !important;
  376. }
  377. .ui.slider.checkbox input:checked ~ .box:before,
  378. .ui.slider.checkbox input:checked ~ label:before {
  379. background-color: #545454 !important;
  380. }
  381. .ui.slider.checkbox input:checked ~ .box:after,
  382. .ui.slider.checkbox input:checked ~ label:after {
  383. left: 2rem;
  384. }
  385. /* Active Focus */
  386. .ui.slider.checkbox input:focus:checked ~ .box,
  387. .ui.slider.checkbox input:focus:checked ~ label {
  388. color: rgba(0, 0, 0, 0.95) !important;
  389. }
  390. .ui.slider.checkbox input:focus:checked ~ .box:before,
  391. .ui.slider.checkbox input:focus:checked ~ label:before {
  392. background-color: #000000 !important;
  393. }
  394. /*--------------
  395. Toggle
  396. ---------------*/
  397. .ui.toggle.checkbox {
  398. min-height: 1.5rem;
  399. }
  400. /* Input */
  401. .ui.toggle.checkbox input {
  402. width: 3.5rem;
  403. height: 1.5rem;
  404. }
  405. /* Label */
  406. .ui.toggle.checkbox .box,
  407. .ui.toggle.checkbox label {
  408. min-height: 1.5rem;
  409. padding-left: 4.5rem;
  410. color: rgba(0, 0, 0, 0.87);
  411. }
  412. .ui.toggle.checkbox label {
  413. padding-top: 0.15em;
  414. }
  415. /* Switch */
  416. .ui.toggle.checkbox .box:before,
  417. .ui.toggle.checkbox label:before {
  418. display: block;
  419. position: absolute;
  420. content: '';
  421. z-index: 1;
  422. -webkit-transform: none;
  423. transform: none;
  424. border: none;
  425. top: 0rem;
  426. background: rgba(0, 0, 0, 0.05);
  427. width: 3.5rem;
  428. height: 1.5rem;
  429. border-radius: 500rem;
  430. }
  431. /* Handle */
  432. .ui.toggle.checkbox .box:after,
  433. .ui.toggle.checkbox label:after {
  434. background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  435. background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  436. position: absolute;
  437. content: '' !important;
  438. opacity: 1;
  439. z-index: 2;
  440. border: none;
  441. box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.13), 0px 0px 0px 1px rgba(0, 0, 0, 0.13) inset;
  442. width: 1.5rem;
  443. height: 1.5rem;
  444. top: 0rem;
  445. left: 0em;
  446. border-radius: 500rem;
  447. -webkit-transition: background 0.3s ease, left 0.3s ease;
  448. transition: background 0.3s ease, left 0.3s ease;
  449. }
  450. .ui.toggle.checkbox input ~ .box:after,
  451. .ui.toggle.checkbox input ~ label:after {
  452. left: -0.05rem;
  453. }
  454. /* Focus */
  455. .ui.toggle.checkbox input:focus ~ .box:before,
  456. .ui.toggle.checkbox input:focus ~ label:before {
  457. background-color: rgba(0, 0, 0, 0.15);
  458. border: none;
  459. }
  460. /* Hover */
  461. .ui.toggle.checkbox .box:hover::before,
  462. .ui.toggle.checkbox label:hover::before {
  463. background-color: rgba(0, 0, 0, 0.15);
  464. border: none;
  465. }
  466. /* Active */
  467. .ui.toggle.checkbox input:checked ~ .box,
  468. .ui.toggle.checkbox input:checked ~ label {
  469. color: rgba(0, 0, 0, 0.95) !important;
  470. }
  471. .ui.toggle.checkbox input:checked ~ .box:before,
  472. .ui.toggle.checkbox input:checked ~ label:before {
  473. background-color: #78CB5B !important;
  474. }
  475. .ui.toggle.checkbox input:checked ~ .box:after,
  476. .ui.toggle.checkbox input:checked ~ label:after {
  477. left: 2.15rem;
  478. }
  479. /* Active Focus */
  480. .ui.toggle.checkbox input:focus:checked ~ .box,
  481. .ui.toggle.checkbox input:focus:checked ~ label {
  482. color: rgba(0, 0, 0, 0.95) !important;
  483. }
  484. .ui.toggle.checkbox input:focus:checked ~ .box:before,
  485. .ui.toggle.checkbox input:focus:checked ~ label:before {
  486. background-color: #59cd30 !important;
  487. }
  488. /*******************************
  489. Variations
  490. *******************************/
  491. /*--------------
  492. Fitted
  493. ---------------*/
  494. .ui.fitted.checkbox .box,
  495. .ui.fitted.checkbox label {
  496. padding-left: 0em !important;
  497. }
  498. .ui.fitted.toggle.checkbox,
  499. .ui.fitted.toggle.checkbox {
  500. width: 3.5rem;
  501. }
  502. .ui.fitted.slider.checkbox,
  503. .ui.fitted.slider.checkbox {
  504. width: 3.5rem;
  505. }
  506. /*******************************
  507. Site Overrides
  508. *******************************/