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.

588 lines
15 KiB

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