form--checkbox-radio.css

Same filename in other branches
  1. 8.9.x 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/3084859
  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: 1.125rem;
  66. height: 1.125rem;
  67. vertical-align: text-bottom;
  68. border: 1px solid #919297;
  69. border-radius: 2px;
  70. background: #fff no-repeat 50% 50%;
  71. background-size: 100% 100%;
  72. box-shadow: 0 0 0 4px transparent;
  73. -webkit-appearance: none;
  74. appearance: none;
  75. }
  76. @media (-ms-high-contrast: active), (forced-colors: active) {
  77. .form-boolean {
  78. -webkit-appearance: auto;
  79. appearance: auto;
  80. }
  81. }
  82. .form-boolean--type-radio {
  83. width: 1.1875rem;
  84. height: 1.1875rem;
  85. border-radius: 1.1875rem;
  86. }
  87. .form-boolean:active,
  88. .form-boolean:hover {
  89. border-color: #232429;
  90. box-shadow: inset 0 0 0 1px #232429;
  91. }
  92. .form-boolean:focus:active,
  93. .form-boolean:focus:hover {
  94. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #232429;
  95. }
  96. .form-boolean--type-checkbox:checked {
  97. border-color: #003ecc;
  98. background-color: #003ecc;
  99. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3.795 7.096l2.387 2.506 6.023-6.327 1.484 1.56-7.507 7.89L2.31 8.656z' fill='%23fff'/%3e%3c/svg%3e");
  100. }
  101. .form-boolean--type-checkbox:checked:active,
  102. .form-boolean--type-checkbox:checked:hover {
  103. border-color: #232429;
  104. background-color: #232429;
  105. }
  106. .form-boolean--type-radio:checked {
  107. border-color: #003ecc;
  108. background-image: url("data:image/svg+xml,%3csvg width='17' height='17' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle r='4.5' cx='8.5' cy='8.5' fill='%23003ecc'/%3e%3c/svg%3e");
  109. box-shadow: inset 0 0 0 1px #003ecc;
  110. }
  111. .form-boolean--type-radio:checked:focus {
  112. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #003ecc;
  113. }
  114. .form-boolean--type-radio:checked:active,
  115. .form-boolean--type-radio:checked:hover {
  116. border-color: #232429;
  117. background-image: url("data:image/svg+xml,%3csvg width='17' height='17' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle r='4.5' cx='8.5' cy='8.5' fill='%23000f33'/%3e%3c/svg%3e");
  118. box-shadow: inset 0 0 0 1px #232429;
  119. }
  120. .form-boolean--type-radio:checked:focus:active,
  121. .form-boolean--type-radio:checked:focus:hover {
  122. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #232429;
  123. }
  124. /**
  125. * Error states.
  126. */
  127. .form-boolean.error {
  128. border-color: #dc2323;
  129. background-color: #fff;
  130. box-shadow: inset 0 0 0 1px #dc2323;
  131. }
  132. .form-boolean.error:active,
  133. .form-boolean.error:hover {
  134. box-shadow: inset 0 0 0 1px #dc2323;
  135. }
  136. .form-boolean.error:focus,
  137. .form-boolean.error:focus:active,
  138. .form-boolean.error:focus:hover {
  139. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #dc2323;
  140. }
  141. .form-boolean.error:checked:active,
  142. .form-boolean.error:checked:hover {
  143. border-color: #dc2323;
  144. background-color: #fff;
  145. }
  146. .form-boolean--type-checkbox.error:checked,
  147. .form-boolean--type-checkbox.error:checked:active,
  148. .form-boolean--type-checkbox.error:checked:hover {
  149. background-color: #dc2323;
  150. }
  151. .form-boolean--type-radio.error:checked,
  152. .form-boolean--type-radio.error:checked:active,
  153. .form-boolean--type-radio.error:checked:hover {
  154. background-image: url("data:image/svg+xml,%3csvg width='17' height='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");
  155. }
  156. .form-boolean--type-radio.error:checked:focus {
  157. box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #dc2323;
  158. }
  159. /**
  160. * Disabled states.
  161. */
  162. .form-boolean[disabled],
  163. .form-boolean[disabled]:hover,
  164. .form-boolean[disabled].error,
  165. .form-boolean[disabled].error:hover,
  166. .form-boolean--type-radio[disabled]:focus:active,
  167. .form-boolean--type-radio[disabled]:active:hover,
  168. .form-boolean--type-radio[disabled].error:active:hover {
  169. border-color: #bababf;
  170. background-color: #f2f2f3;
  171. background-image: none;
  172. box-shadow: none;
  173. }
  174. .form-boolean--type-checkbox[disabled]:checked {
  175. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3.795 7.096l2.387 2.506 6.023-6.327 1.484 1.56-7.507 7.89L2.31 8.656z' fill='%2382828c'/%3e%3c/svg%3e");
  176. }
  177. .form-boolean--type-radio[disabled]:checked,
  178. .form-boolean--type-radio[disabled].error:checked {
  179. background-image: url("data:image/svg+xml,%3csvg width='17' height='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");
  180. }

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