form--checkbox-radio.css
Same filename in other branches
Checkbox and radio input elements.
File
-
core/
themes/ claro/ css/ components/ form--checkbox-radio.css
View source
- /*
- * DO NOT EDIT THIS FILE.
- * See the following change record for more information,
- * https://www.drupal.org/node/2815083
- * @preserve
- */
-
- /**
- * @file
- * Checkbox and radio input elements.
- */
-
- /**
- * Form item modifiers.
- */
-
- .form-type--boolean {
- margin-left: 1.6875rem; /* LTR */
- line-height: 1.5rem;
- }
-
- [dir="rtl"] .form-type--boolean {
- margin-right: 1.6875rem;
- margin-left: 0;
- }
-
- /**
- * Radio and checkbox items that are the child of a form item.
- */
-
- .form-type--boolean .form-boolean {
- position: relative;
- top: 0.75rem;
- float: left; /* LTR */
- margin-left: -1.6875rem; /* LTR */
- transform: translateY(-50%);
- }
-
- [dir="rtl"] .form-type--boolean .form-boolean {
- float: right;
- margin-right: -1.6875rem;
- margin-left: 0;
- }
-
- .form-type--boolean.form-item--no-label {
- margin-left: 0;
- }
-
- [dir="rtl"] .form-type--boolean.form-item--no-label {
- margin-right: 0;
- }
-
- .form-type--boolean.form-item--no-label .form-boolean,
- [dir="rtl"] .form-type--boolean.form-item--no-label .form-boolean {
- position: static;
- float: none;
- margin-right: 0;
- margin-left: 0;
- transform: none;
- }
-
- /**
- * When form items are nested in radios or checkboxes group, reduce the default
- * space between them.
- */
-
- .form-boolean-group .form-type--boolean {
- margin-top: 0.4em;
- margin-bottom: 0.4em;
- }
-
- /**
- * Input appearance.
- */
-
- .form-boolean {
- display: inline-block;
- box-sizing: border-box;
- width: 18px;
- height: 18px;
- vertical-align: text-bottom;
- border: 1px solid #8e929c;
- border-radius: 2px;
- background: #fff no-repeat 50% 50%;
- 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");
- background-size: 100% 100%;
- box-shadow: 0 0 0 4px transparent;
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- }
-
- .form-boolean--type-radio {
- width: 19px;
- height: 19px;
- border-radius: 19px;
- }
-
- .form-boolean:active,
- .form-boolean:hover {
- border-color: #222330;
- box-shadow: inset 0 0 0 1px #222330;
- }
-
- .form-boolean:focus:active,
- .form-boolean:focus:hover {
- box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #222330;
- }
-
- .form-boolean--type-checkbox:checked {
- border-color: #003cc5;
- background-color: #003cc5;
- 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");
- }
-
- .form-boolean--type-checkbox:checked:active,
- .form-boolean--type-checkbox:checked:hover {
- border-color: #222330;
- background-color: #222330;
- }
-
- .form-boolean--type-radio:checked {
- border-color: #003cc5;
- 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");
- box-shadow: inset 0 0 0 1px #003cc5;
- }
-
- .form-boolean--type-radio:checked:focus {
- box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #003cc5;
- }
-
- .form-boolean--type-radio:checked:active,
- .form-boolean--type-radio:checked:hover {
- border-color: #222330;
- 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");
- box-shadow: inset 0 0 0 1px #222330;
- }
-
- .form-boolean--type-radio:checked:focus:active,
- .form-boolean--type-radio:checked:focus:hover {
- box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #222330;
- }
-
- /**
- * Error states.
- */
-
- .form-boolean.error {
- border-color: #d72222;
- background-color: #fff;
- box-shadow: inset 0 0 0 1px #d72222;
- }
-
- .form-boolean.error:active,
- .form-boolean.error:hover {
- box-shadow: inset 0 0 0 1px #d72222;
- }
-
- .form-boolean.error:focus,
- .form-boolean.error:focus:active,
- .form-boolean.error:focus:hover {
- box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #d72222;
- }
-
- .form-boolean.error:checked:active,
- .form-boolean.error:checked:hover {
- border-color: #d72222;
- background-color: #fff;
- }
-
- .form-boolean--type-checkbox.error:checked,
- .form-boolean--type-checkbox.error:checked:active,
- .form-boolean--type-checkbox.error:checked:hover {
- background-color: #d72222;
- }
-
- .form-boolean--type-radio.error:checked,
- .form-boolean--type-radio.error:checked:active,
- .form-boolean--type-radio.error:checked:hover {
- 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");
- }
-
- .form-boolean--type-radio.error:checked:focus {
- box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769, inset 0 0 0 1px #d72222;
- }
-
- /**
- * Disabled states.
- */
-
- .form-boolean[disabled],
- .form-boolean[disabled]:hover,
- .form-boolean[disabled].error,
- .form-boolean[disabled].error:hover,
- .form-boolean--type-radio[disabled]:focus:active,
- .form-boolean--type-radio[disabled]:active:hover,
- .form-boolean--type-radio[disabled].error:active:hover {
- border-color: #bababf;
- background-color: #f2f2f3;
- background-image: none;
- box-shadow: none;
- }
-
- .form-boolean--type-checkbox[disabled]:checked {
- 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");
- }
-
- .form-boolean--type-radio[disabled]:checked,
- .form-boolean--type-radio[disabled].error:checked {
- 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");
- }
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.