form--checkbox-radio--ie.pcss.css

Same filename in other branches
  1. 9 core/themes/claro/css/components/form--checkbox-radio--ie.pcss.css

Checkbox and radio input elements styles for IE11 and below.

File

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

View source
  1. /**
  2. * @file
  3. * Checkbox and radio input elements styles for IE11 and below.
  4. */
  5. @import "../base/variables.pcss.css";
  6. .form-boolean::-ms-check {
  7. display: inline-block;
  8. box-sizing: border-box;
  9. width: 18px;
  10. height: 18px;
  11. vertical-align: text-bottom;
  12. color: transparent; /* IE */
  13. border: 1px solid var(--input-border-color);
  14. border-radius: 2px;
  15. background: var(--input-bg-color) no-repeat 50% 50%;
  16. 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");
  17. background-size: 100% 100%;
  18. box-shadow: 0 0 0 4px transparent;
  19. }
  20. .form-boolean--type-radio::-ms-check {
  21. width: 19px;
  22. height: 19px;
  23. border-radius: 19px;
  24. }
  25. .form-boolean:focus::-ms-check {
  26. color: transparent; /* IE */
  27. }
  28. .form-boolean:active::-ms-check,
  29. .form-boolean:hover::-ms-check {
  30. border-color: var(--input-fg-color);
  31. box-shadow: inset 0 0 0 1px var(--input-fg-color);
  32. }
  33. .form-boolean:focus:active::-ms-check,
  34. .form-boolean:focus:hover::-ms-check {
  35. box-shadow: 0 0 0 2px var(--color-white), 0 0 0 5px var(--color-focus), inset 0 0 0 1px var(--input-fg-color);
  36. }
  37. .form-boolean--type-checkbox:checked::-ms-check {
  38. color: transparent; /* IE */
  39. border-color: var(--input--focus-border-color);
  40. background-color: var(--input--focus-border-color);
  41. 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");
  42. }
  43. .form-boolean--type-checkbox:checked:active::-ms-check,
  44. .form-boolean--type-checkbox:checked:hover::-ms-check {
  45. border-color: var(--input-fg-color);
  46. background-color: var(--input-fg-color);
  47. }
  48. .form-boolean--type-radio:checked::-ms-check {
  49. color: transparent; /* IE */
  50. border-color: var(--input--focus-border-color);
  51. 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");
  52. box-shadow: inset 0 0 0 1px var(--input--focus-border-color);
  53. }
  54. .form-boolean--type-checkbox:checked:active::-ms-check,
  55. .form-boolean--type-checkbox:checked:hover::-ms-check {
  56. border-color: var(--input-fg-color);
  57. background-color: var(--input-fg-color);
  58. }
  59. .form-boolean--type-radio:checked::-ms-check {
  60. border-color: var(--input--focus-border-color);
  61. 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");
  62. box-shadow: inset 0 0 0 1px var(--input--focus-border-color);
  63. }
  64. .form-boolean--type-radio:checked:focus::-ms-check {
  65. box-shadow: 0 0 0 2px var(--color-white), 0 0 0 5px var(--color-focus), inset 0 0 0 1px var(--input--focus-border-color);
  66. }
  67. .form-boolean--type-radio:checked:active::-ms-check,
  68. .form-boolean--type-radio:checked:hover::-ms-check {
  69. border-color: var(--input-fg-color);
  70. 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");
  71. box-shadow: inset 0 0 0 1px var(--input-fg-color);
  72. }
  73. .form-boolean--type-radio:checked:focus:active::-ms-check,
  74. .form-boolean--type-radio:checked:focus:hover::-ms-check {
  75. box-shadow: 0 0 0 2px var(--color-white), 0 0 0 5px var(--color-focus), inset 0 0 0 1px var(--input-fg-color);
  76. }
  77. /**
  78. * Error states.
  79. */
  80. .form-boolean.error::-ms-check {
  81. border-color: var(--input--error-border-color);
  82. background-color: var(--input-bg-color);
  83. box-shadow: inset 0 0 0 1px var(--input--error-border-color);
  84. }
  85. .form-boolean.error:active::-ms-check,
  86. .form-boolean.error:hover::-ms-check {
  87. box-shadow: inset 0 0 0 1px var(--input--error-border-color);
  88. }
  89. .form-boolean.error:focus::-ms-check,
  90. .form-boolean.error:focus:active::-ms-check,
  91. .form-boolean.error:focus:hover::-ms-check {
  92. box-shadow: 0 0 0 2px var(--color-white), 0 0 0 5px var(--color-focus), inset 0 0 0 1px var(--input--error-border-color);
  93. }
  94. .form-boolean.error:checked:active::-ms-check,
  95. .form-boolean.error:checked:hover::-ms-check {
  96. border-color: var(--input--error-border-color);
  97. background-color: var(--input-bg-color);
  98. }
  99. .form-boolean--type-checkbox.error:checked::-ms-check,
  100. .form-boolean--type-checkbox.error:checked:active::-ms-check,
  101. .form-boolean--type-checkbox.error:checked:hover::-ms-check {
  102. background-color: var(--input--error-border-color);
  103. }
  104. .form-boolean--type-radio.error:checked::-ms-check,
  105. .form-boolean--type-radio.error:checked:active::-ms-check,
  106. .form-boolean--type-radio.error:checked:hover::-ms-check {
  107. 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");
  108. }
  109. .form-boolean--type-radio.error:checked:focus::-ms-check {
  110. box-shadow: 0 0 0 2px var(--color-white), 0 0 0 5px var(--color-focus), inset 0 0 0 1px var(--input--error-border-color);
  111. }
  112. /**
  113. * Disabled states.
  114. */
  115. .form-boolean[disabled]::-ms-check,
  116. .form-boolean[disabled]:hover::-ms-check,
  117. .form-boolean[disabled].error::-ms-check,
  118. .form-boolean[disabled].error:hover::-ms-check,
  119. .form-boolean--type-radio[disabled]:focus:active::-ms-check,
  120. .form-boolean--type-radio[disabled]:active:hover::-ms-check,
  121. .form-boolean--type-radio[disabled].error:active:hover::-ms-check {
  122. border-color: var(--input--disabled-border-color);
  123. background-color: var(--input--disabled-bg-color);
  124. background-image: none;
  125. box-shadow: none;
  126. }
  127. .form-boolean--type-checkbox[disabled]:checked::-ms-check {
  128. color: transparent; /* IE */
  129. 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");
  130. }
  131. .form-boolean--type-radio[disabled]:checked::-ms-check,
  132. .form-boolean--type-radio[disabled].error:checked::-ms-check {
  133. color: transparent; /* IE */
  134. 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");
  135. }

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