form--checkbox-radio.css

Same filename in other branches
  1. 9 core/themes/claro/css/components/form--checkbox-radio.css
  2. 10 core/themes/claro/css/components/form--checkbox-radio.css
  3. 11.x core/themes/claro/css/components/form--checkbox-radio.css

Checkbox and radio input elements.

File

core/themes/claro/css/components/form--checkbox-radio.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Checkbox and radio input elements.
  10. */
  11. /**
  12. * Form item modifiers.
  13. */
  14. .form-type--boolean {
  15. margin-left: 1.6875rem; /* LTR */
  16. line-height: 1.5rem;
  17. }
  18. [dir="rtl"] .form-type--boolean {
  19. margin-right: 1.6875rem;
  20. margin-left: 0;
  21. }
  22. /**
  23. * Radio and checkbox items that are the child of a form item.
  24. */
  25. .form-type--boolean .form-boolean {
  26. position: relative;
  27. top: 0.75rem;
  28. float: left; /* LTR */
  29. margin-left: -1.6875rem; /* LTR */
  30. transform: translateY(-50%);
  31. }
  32. [dir="rtl"] .form-type--boolean .form-boolean {
  33. float: right;
  34. margin-right: -1.6875rem;
  35. margin-left: 0;
  36. }
  37. .form-type--boolean.form-item--no-label {
  38. margin-left: 0;
  39. }
  40. [dir="rtl"] .form-type--boolean.form-item--no-label {
  41. margin-right: 0;
  42. }
  43. .form-type--boolean.form-item--no-label .form-boolean,
  44. [dir="rtl"] .form-type--boolean.form-item--no-label .form-boolean {
  45. position: static;
  46. float: none;
  47. margin-right: 0;
  48. margin-left: 0;
  49. transform: none;
  50. }
  51. /**
  52. * When form items are nested in radios or checkboxes group, reduce the default
  53. * space between them.
  54. */
  55. .form-boolean-group .form-type--boolean {
  56. margin-top: 0.4em;
  57. margin-bottom: 0.4em;
  58. }
  59. /**
  60. * Input appearance.
  61. */
  62. .form-boolean {
  63. display: inline-block;
  64. box-sizing: border-box;
  65. width: 18px;
  66. height: 18px;
  67. vertical-align: text-bottom;
  68. border: 1px solid #8e929c;
  69. border-radius: 2px;
  70. background: #fff no-repeat 50% 50%;
  71. background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.18182 6.96572L1.97655 4.64855L1.79545 4.45826L1.61436 4.64855L0.818904 5.48437L0.654878 5.65672L0.818904 5.82907L4.00072 9.17235L4.18182 9.36263L4.36291 9.17235L11.1811 2.00817L11.3451 1.83582L11.1811 1.66347L10.3856 .827651L10.2045 .637365L10.0234 .82765L4.18182 6.96572Z' fill='white' /%3E%3C/svg%3E");
  72. background-size: 100% 100%;
  73. box-shadow: 0 0 0 4px transparent;
  74. -webkit-appearance: none;
  75. -moz-appearance: none;
  76. appearance: none;
  77. }
  78. .form-boolean--type-radio {
  79. width: 19px;
  80. height: 19px;
  81. border-radius: 19px;
  82. }
  83. .form-boolean:active,
  84. .form-boolean:hover {
  85. border-color: #222330;
  86. box-shadow: inset 0 0 0 1px #222330;
  87. }
  88. .form-boolean:focus:active,
  89. .form-boolean:focus:hover {
  90. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #222330;
  91. }
  92. .form-boolean--type-checkbox:checked {
  93. border-color: #003cc5;
  94. background-color: #003cc5;
  95. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.7949219,7.095703 6.1816406,9.601563 12.205078,3.2753906 13.689453,4.8359375 6.1816406,12.724609 2.3105469,8.65625 Z' fill='white'/%3E%3C/svg%3E");
  96. }
  97. .form-boolean--type-checkbox:checked:active,
  98. .form-boolean--type-checkbox:checked:hover {
  99. border-color: #222330;
  100. background-color: #222330;
  101. }
  102. .form-boolean--type-radio:checked {
  103. border-color: #003cc5;
  104. background-image: url("data:image/svg+xml,%3Csvg width='17' height='17' viewBox='0 0 17 17' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle r='4.5' cx='8.5' cy='8.5' fill='%23004adc'/%3E%3C/svg%3E");
  105. box-shadow: inset 0 0 0 1px #003cc5;
  106. }
  107. .form-boolean--type-radio:checked:focus {
  108. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #003cc5;
  109. }
  110. .form-boolean--type-radio:checked:active,
  111. .form-boolean--type-radio:checked:hover {
  112. border-color: #222330;
  113. background-image: url("data:image/svg+xml,%3Csvg width='17' height='17' viewBox='0 0 17 17' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle r='4.5' cx='8.5' cy='8.5' fill='%23222330'/%3E%3C/svg%3E");
  114. box-shadow: inset 0 0 0 1px #222330;
  115. }
  116. .form-boolean--type-radio:checked:focus:active,
  117. .form-boolean--type-radio:checked:focus:hover {
  118. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #222330;
  119. }
  120. /**
  121. * Error states.
  122. */
  123. .form-boolean.error {
  124. border-color: #d72222;
  125. background-color: #fff;
  126. box-shadow: inset 0 0 0 1px #d72222;
  127. }
  128. .form-boolean.error:active,
  129. .form-boolean.error:hover {
  130. box-shadow: inset 0 0 0 1px #d72222;
  131. }
  132. .form-boolean.error:focus,
  133. .form-boolean.error:focus:active,
  134. .form-boolean.error:focus:hover {
  135. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #d72222;
  136. }
  137. .form-boolean.error:checked:active,
  138. .form-boolean.error:checked:hover {
  139. border-color: #d72222;
  140. background-color: #fff;
  141. }
  142. .form-boolean--type-checkbox.error:checked,
  143. .form-boolean--type-checkbox.error:checked:active,
  144. .form-boolean--type-checkbox.error:checked:hover {
  145. background-color: #d72222;
  146. }
  147. .form-boolean--type-radio.error:checked,
  148. .form-boolean--type-radio.error:checked:active,
  149. .form-boolean--type-radio.error:checked:hover {
  150. background-image: url("data:image/svg+xml,%3Csvg width='17' height='17' viewBox='0 0 17 17' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle r='4.5' cx='8.5' cy='8.5' fill='%23d72222'/%3E%3C/svg%3E");
  151. }
  152. .form-boolean--type-radio.error:checked:focus {
  153. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #d72222;
  154. }
  155. /**
  156. * Disabled states.
  157. */
  158. .form-boolean[disabled],
  159. .form-boolean[disabled]:hover,
  160. .form-boolean[disabled].error,
  161. .form-boolean[disabled].error:hover,
  162. .form-boolean--type-radio[disabled]:focus:active,
  163. .form-boolean--type-radio[disabled]:active:hover,
  164. .form-boolean--type-radio[disabled].error:active:hover {
  165. border-color: #bababf;
  166. background-color: #f2f2f3;
  167. background-image: none;
  168. box-shadow: none;
  169. }
  170. .form-boolean--type-checkbox[disabled]:checked {
  171. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.7949219,7.095703 6.1816406,9.601563 12.205078,3.2753906 13.689453,4.8359375 6.1816406,12.724609 2.3105469,8.65625 Z' fill='%2382828c'/%3E%3C/svg%3E");
  172. }
  173. .form-boolean--type-radio[disabled]:checked,
  174. .form-boolean--type-radio[disabled].error:checked {
  175. background-image: url("data:image/svg+xml,%3Csvg width='17' height='17' viewBox='0 0 17 17' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle r='4.5' cx='8.5' cy='8.5' fill='%2382828c'/%3E%3C/svg%3E");
  176. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.