You are here

form-boolean.css in Drupal 9

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: 1.6875rem;
  15. height: 1.6875rem;
  16. margin: 0;
  17. vertical-align: middle;
  18. border: 1px solid #7e96a7;
  19. border-radius: 0.1875rem;
  20. background-color: #fff;
  21. background-repeat: no-repeat;
  22. background-position: 50% 50%;
  23. background-size: 1.125rem 1.125rem;
  24. -webkit-appearance: none;
  25. -moz-appearance: none;
  26. appearance: none
  27. }
  28. input[type="checkbox"]:focus, input[type="radio"]:focus {
  29. border: solid 2px #2494db;
  30. outline: solid 2px #2494db
  31. }
  32. @supports (outline-style: double) {
  33. input[type="checkbox"]:focus, 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, input[type="radio"]:hover {
  41. border-color: #53b0eb;
  42. }
  43. input[type="checkbox"][disabled], input[type="radio"][disabled] {
  44. background-color: #f1f4f7
  45. }
  46. input[type="checkbox"][disabled]:hover, input[type="radio"][disabled]:hover {
  47. border-color: #7e96a7;
  48. }
  49. input[type="checkbox"][disabled]:checked, input[type="radio"][disabled]:checked {
  50. border-width: 1px;
  51. }
  52. input[type="checkbox"]:checked, input[type="radio"]:checked {
  53. border-width: 2px;
  54. }
  55. input[type="checkbox"].error, input[type="radio"].error {
  56. border: solid 2px #e33f1e
  57. }
  58. input[type="checkbox"].error:focus, input[type="radio"].error:focus {
  59. outline-color: #e33f1e;
  60. outline-offset: -2px;
  61. }
  62. input[type="checkbox"],
  63. input[type="radio"] {
  64. /* Specific pseudo-element to apply red borders for IE11 bool elements in case of error */
  65. }
  66. input[type="checkbox"].error::-ms-check, input[type="radio"].error::-ms-check {
  67. border: 1px solid #e33f1e;
  68. }
  69. [dir="ltr"] input[type="checkbox"] + label,[dir="ltr"] input[type="radio"] + label {
  70. padding-left: 0.5625rem
  71. }
  72. [dir="rtl"] input[type="checkbox"] + label,[dir="rtl"] input[type="radio"] + label {
  73. padding-right: 0.5625rem
  74. }
  75. input[type="checkbox"] + label, input[type="radio"] + label {
  76. display: inline-block;
  77. }
  78. input[type="checkbox"]:checked {
  79. 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");
  80. }
  81. input[type="radio"] {
  82. border-radius: 50%
  83. }
  84. input[type="radio"]:checked {
  85. 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");
  86. background-size: 1.0625rem;
  87. }
  88. input[type="radio"]:focus {
  89. border-width: 2px;
  90. border-color: #2494db;
  91. outline-color: transparent;
  92. box-shadow: 0 0 0 2px white, 0 0 0 4px #2494db;
  93. }
  94. input[type="radio"].error:focus {
  95. outline-color: transparent;
  96. box-shadow: 0 0 0 2px white, 0 0 0 4px #e33f1e;
  97. }
  98. .form-type-boolean {
  99. margin-top: 1.125rem;
  100. margin-bottom: 1.125rem;
  101. }