form-boolean.css

Same filename in other branches
  1. 9 core/themes/olivero/css/components/form-boolean.css
  2. 11.x core/themes/olivero/css/components/form-boolean.css

Checkbox and radio input elements.

File

core/themes/olivero/css/components/form-boolean.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. input[type="checkbox"],
  12. input[type="radio"] {
  13. display: inline-block;
  14. width: var(--sp1-5);
  15. height: var(--sp1-5);
  16. margin: 0;
  17. vertical-align: middle;
  18. border: 1px solid var(--color--gray-60);
  19. border-radius: 0.1875rem;
  20. background-color: var(--color--white);
  21. background-repeat: no-repeat;
  22. background-position: 50% 50%;
  23. background-size: var(--sp1) var(--sp1);
  24. appearance: none;
  25. }
  26. input[type="checkbox"]:focus,
  27. input[type="radio"]:focus {
  28. border: solid 2px var(--color--primary-50);
  29. outline: solid 2px var(--color--primary-50);
  30. }
  31. @supports (outline-style: double) {
  32. input[type="checkbox"]:focus,
  33. input[type="radio"]:focus {
  34. border-width: 1px;
  35. outline-width: 6px;
  36. outline-style: double;
  37. outline-offset: -1px;
  38. }
  39. }
  40. input[type="checkbox"]:hover,
  41. input[type="radio"]:hover {
  42. border-color: var(--color--primary-60);
  43. }
  44. input[type="checkbox"][disabled],
  45. input[type="radio"][disabled] {
  46. background-color: var(--color--gray-100);
  47. }
  48. input[type="checkbox"][disabled]:hover,
  49. input[type="radio"][disabled]:hover {
  50. border-color: var(--color--gray-60);
  51. }
  52. input[type="checkbox"][disabled]:checked,
  53. input[type="radio"][disabled]:checked {
  54. border-width: 1px;
  55. }
  56. input[type="checkbox"]:checked,
  57. input[type="radio"]:checked {
  58. border-width: 2px;
  59. }
  60. input.error[type="checkbox"],
  61. input.error[type="radio"] {
  62. border: solid 2px var(--color--red);
  63. }
  64. input.error[type="checkbox"]:focus,
  65. input.error[type="radio"]:focus {
  66. outline-color: var(--color--red);
  67. outline-offset: -2px;
  68. }
  69. input[type="checkbox"] + label,
  70. input[type="radio"] + label {
  71. display: inline-block;
  72. padding-inline-start: var(--sp0-5);
  73. }
  74. input[type="checkbox"]:checked {
  75. background-image: url("data:image/svg+xml,%3Csvg width='17px' height='13px' viewBox='0 0 17 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cpath d='M14.8232,0.176777 C14.9209,0.0791457 15.0791,0.0791455 15.1768,0.176777 L16.9445,1.94454 C17.0422,2.04217 17.0422,2.20047 16.9445,2.2981 L6.23744,13.0052 C6.13981,13.1028 5.98151,13.1028 5.88388,13.0052 L0.176777,7.2981 C0.0791456,7.20047 0.0791456,7.04218 0.176777,6.94454 L1.94454,5.17678 C2.04217,5.07915 2.20047,5.07915 2.2981,5.17678 L5.88388,8.76256 C5.98151,8.86019 6.13981,8.86019 6.23744,8.76256 L14.8232,0.176777 Z' id='Path' fill='%232494DB' fill-rule='nonzero'%3E%3C/path%3E%3C/svg%3E");
  76. }
  77. input[type="radio"] {
  78. border-radius: 50%;
  79. }
  80. input[type="radio"]:checked {
  81. 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 cx='8.5' cy='8.5' r='8.5' fill='%232494DB'/%3E%3C/svg%3E%0A");
  82. background-size: 1.0625rem;
  83. }
  84. input[type="radio"]:focus {
  85. border-width: 2px;
  86. border-color: var(--color--primary-50);
  87. outline-color: transparent;
  88. box-shadow:
  89. 0 0 0 2px white,
  90. 0 0 0 4px var(--color--primary-50);
  91. }
  92. input.error[type="radio"]:focus {
  93. outline-color: transparent;
  94. box-shadow:
  95. 0 0 0 2px white,
  96. 0 0 0 4px var(--color--red);
  97. }
  98. .form-type-boolean {
  99. margin-block: var(--sp1);
  100. }

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