form-select.css

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

Select input elements.

File

core/themes/olivero/css/components/form-select.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. * Select input elements.
  10. */
  11. :root {
  12. --form-element-select-icon: url("data:image/svg+xml,%3csvg width='18' height='11' viewBox='0 0 18 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18 1.49699C18 1.35271 17.9279 1.19038 17.8196 1.08216L16.9178 0.18036C16.8096 0.0721439 16.6473 0 16.503 0C16.3587 0 16.1964 0.0721439 16.0882 0.18036L9 7.26854L1.91182 0.18036C1.80361 0.0721439 1.64128 0 1.49699 0C1.33467 0 1.19038 0.0721439 1.08216 0.18036L0.180361 1.08216C0.0721442 1.19038 0 1.35271 0 1.49699C0 1.64128 0.0721442 1.80361 0.180361 1.91182L8.58517 10.3166C8.69339 10.4248 8.85571 10.497 9 10.497C9.14429 10.497 9.30661 10.4248 9.41483 10.3166L17.8196 1.91182C17.9279 1.80361 18 1.64128 18 1.49699Z' fill='%235D7585'/%3e%3c/svg%3e");
  13. }
  14. select {
  15. max-width: 100%;
  16. height: var(--sp3);
  17. padding-block: 0;
  18. padding-inline-start: var(--sp);
  19. padding-inline-end: var(--sp3);
  20. color: var(--color-text-neutral-loud);
  21. border: 1px solid var(--color--gray-60);
  22. border-radius: var(--border-radius);
  23. background-color: var(--color--white);
  24. background-image: var(--form-element-select-icon);
  25. background-repeat: no-repeat;
  26. background-position: right var(--sp) center; /* LTR */
  27. font-family: inherit;
  28. font-size: inherit;
  29. appearance: none;
  30. }
  31. select:focus {
  32. border: solid 2px var(--color--primary-50);
  33. outline: solid 2px var(--color--primary-50);
  34. }
  35. @supports (outline-style: double) {
  36. select:focus {
  37. border-width: 1px;
  38. outline-width: 6px;
  39. outline-style: double;
  40. outline-offset: -1px;
  41. }
  42. }
  43. select[disabled] {
  44. color: var(--color--gray-60);
  45. background-color: var(--color--gray-100);
  46. }
  47. select.error {
  48. border: solid 2px var(--color--red);
  49. }
  50. select.error:focus {
  51. outline-color: var(--color--red);
  52. }
  53. select[multiple] {
  54. height: auto;
  55. padding: var(--sp0-5);
  56. background-image: none;
  57. line-height: 1; /* Needed by non-Chromium based MS Edge browsers. */
  58. }
  59. select[multiple] option {
  60. padding: var(--sp0-5);
  61. }
  62. select.form-element--small {
  63. height: var(--sp2-5);
  64. }
  65. /* Necessary to show chevron in forced colors mode in modern browsers. */
  66. @media (forced-colors: active) {
  67. select {
  68. padding-inline-end: var(--sp);
  69. background-image: none;
  70. appearance: listbox; /* Default appearance value for modern browsers. */
  71. /* Lets browser set appearance to whatever the browser's default is. */
  72. }
  73. @supports (appearance: revert) {
  74. select {
  75. appearance: revert;
  76. }
  77. }
  78. }
  79. [dir="rtl"] select {
  80. background-position: left var(--sp) center;
  81. }

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