form.css

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/css/components/forms/form.css
  2. 11.x core/themes/olivero/css/components/form.css
  3. 11.x core/themes/claro/css/components/form.css
  4. 11.x core/themes/starterkit_theme/css/components/form.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/components/form.css
  2. 9 core/themes/olivero/css/components/form.css
  3. 9 core/themes/seven/css/components/form.css
  4. 9 core/themes/seven/css/classy/components/form.css
  5. 9 core/themes/claro/css/components/form.css
  6. 9 core/themes/bartik/css/components/form.css
  7. 9 core/themes/bartik/css/classy/components/form.css
  8. 9 core/themes/starterkit_theme/css/components/form.css
  9. 9 core/themes/classy/css/components/form.css
  10. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/form.css
  11. 8.9.x core/themes/seven/css/components/form.css
  12. 8.9.x core/themes/seven/css/classy/components/form.css
  13. 8.9.x core/themes/claro/css/components/form.css
  14. 8.9.x core/themes/bartik/css/components/form.css
  15. 8.9.x core/themes/bartik/css/classy/components/form.css
  16. 8.9.x core/themes/classy/css/components/form.css
  17. 10 core/profiles/demo_umami/themes/umami/css/components/forms/form.css
  18. 10 core/misc/dialog/off-canvas/css/form.css
  19. 10 core/themes/olivero/css/components/form.css
  20. 10 core/themes/claro/css/components/form.css
  21. 10 core/themes/starterkit_theme/css/components/form.css

Visual styling for forms in the off-canvas dialog.

@internal

File

core/misc/dialog/off-canvas/css/form.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. * Visual styling for forms in the off-canvas dialog.
  10. *
  11. * @internal
  12. */
  13. #drupal-off-canvas-wrapper {
  14. --drupal-off-canvas-input-padding: var(--off-canvas-vertical-spacing-unit);
  15. --drupal-off-canvas-input-background-color: #fff;
  16. --drupal-off-canvas-input-border: solid 1px transparent;
  17. --drupal-off-canvas-input-border-radius: 2px;
  18. --drupal-off-canvas-input-font-size: 0.875rem;
  19. --drupal-off-canvas-input-text-color: #333;
  20. --drupal-off-canvas-fieldset-background-color: transparent;
  21. --drupal-off-canvas-fieldset-border-width: 1px;
  22. --drupal-off-canvas-fieldset-border-color: var(--off-canvas-border-color);
  23. }
  24. #drupal-off-canvas-wrapper form {
  25. padding-block: var(--off-canvas-padding);
  26. }
  27. #drupal-off-canvas-wrapper form > *:first-child {
  28. margin-top: 0;
  29. padding-top: 0;
  30. }
  31. #drupal-off-canvas-wrapper .ck-content {
  32. color: var(--drupal-off-canvas-input-text-color);
  33. }
  34. #drupal-off-canvas-wrapper .form-item:where(:not(fieldset)) {
  35. padding: var(--off-canvas-vertical-spacing-unit) 0;
  36. }
  37. #drupal-off-canvas-wrapper .form-items-inline > * {
  38. display: inline-block;
  39. }
  40. #drupal-off-canvas-wrapper label {
  41. display: block;
  42. }
  43. #drupal-off-canvas-wrapper .form-type-boolean {
  44. padding: calc(0.5 * var(--off-canvas-vertical-spacing-unit)) 0;
  45. }
  46. #drupal-off-canvas-wrapper .description,
  47. #drupal-off-canvas-wrapper .form-item__description {
  48. margin: calc(0.5 * var(--off-canvas-vertical-spacing-unit)) 0;
  49. font-size: 0.75rem;
  50. }
  51. #drupal-off-canvas-wrapper .form-required::after {
  52. content: "*";
  53. }
  54. #drupal-off-canvas-wrapper .fieldset,
  55. #drupal-off-canvas-wrapper fieldset {
  56. margin: calc(2 * var(--off-canvas-vertical-spacing-unit)) 0;
  57. padding: var(--off-canvas-vertical-spacing-unit);
  58. border: solid var(--drupal-off-canvas-fieldset-border-width) var(--drupal-off-canvas-fieldset-border-color);
  59. background-color: var(--drupal-off-canvas-fieldset-background-color);
  60. }
  61. #drupal-off-canvas-wrapper legend,
  62. #drupal-off-canvas-wrapper .fieldset__legend {
  63. display: contents;
  64. font-weight: bold;
  65. }
  66. #drupal-off-canvas-wrapper :is(.fieldset, fieldset, .draggable-table) input:where(:not([type="submit"], [type="checkbox"], [type="radio"])) {
  67. width: 100%; /* Prevent text fields from breaking out of tables and fieldsets at narrow widths. */
  68. }
  69. #drupal-off-canvas-wrapper input,
  70. #drupal-off-canvas-wrapper textarea {
  71. font-family: inherit;
  72. }
  73. #drupal-off-canvas-wrapper input:where(:not([type="submit"], [type="checkbox"], [type="radio"], [type="file"])),
  74. #drupal-off-canvas-wrapper select,
  75. #drupal-off-canvas-wrapper textarea {
  76. max-width: 100%;
  77. padding: var(--drupal-off-canvas-input-padding);
  78. color: var(--drupal-off-canvas-input-text-color);
  79. border: var(--drupal-off-canvas-input-border);
  80. border-radius: var(--drupal-off-canvas-input-border-radius);
  81. background-color: var(--drupal-off-canvas-input-background-color);
  82. font-size: var(--drupal-off-canvas-input-font-size);
  83. }
  84. :is(#drupal-off-canvas-wrapper input[type="checkbox"]) + label,
  85. :is(#drupal-off-canvas-wrapper input[type="radio"]) + label {
  86. display: inline;
  87. }
  88. #drupal-off-canvas-wrapper input[type="file"] {
  89. margin-bottom: var(--off-canvas-vertical-spacing-unit);
  90. }
  91. #drupal-off-canvas-wrapper input[type="search"] {
  92. appearance: none; /* Necessary for Safari. */
  93. }
  94. #drupal-off-canvas-wrapper select {
  95. appearance: none;
  96. padding-inline-end: 1.25rem;
  97. border: var(--drupal-off-canvas-input-border);
  98. border-radius: var(--drupal-off-canvas-input-border-radius);
  99. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3e%3cpath fill='none' stroke-width='1.5' d='M1 1l6 6 6-6' stroke='%23545560'/%3e%3c/svg%3e");
  100. background-repeat: no-repeat;
  101. background-position: center right 5px; /* LTR */
  102. background-size: 0.75rem;
  103. }
  104. [dir="rtl"] #drupal-off-canvas-wrapper select {
  105. background-position: center left 5px;
  106. }
  107. @media (forced-colors: active) {
  108. #drupal-off-canvas-wrapper select {
  109. appearance: revert;
  110. padding-inline-end: 0;
  111. background: revert;
  112. }
  113. }
  114. /*
  115. * Autocomplete.
  116. */
  117. #drupal-off-canvas-wrapper .form-autocomplete {
  118. padding-inline-end: 2.5rem; /* Room for icon. */
  119. background-image: url("data:image/svg+xml,%3csvg width='40' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 1C3.46.827-.188 5.787 1.313 10.068c1.176 4.384 6.993 6.417 10.637 3.7.326-.39.565.276.846.442l3.74 3.739 1.413-1.414-4.35-4.35c2.811-3.468 1.15-9.247-3.062-10.71A7.003 7.003 0 008 1zm0 2c3.242-.123 5.849 3.42 4.777 6.477-.842 3.132-4.994 4.58-7.6 2.65-2.745-1.73-2.9-6.125-.285-8.044A5.006 5.006 0 018 3z' fill='%23868686'/%3e%3c/svg%3e");
  120. background-repeat: no-repeat;
  121. background-position: center right 1px; /* LTR */
  122. }
  123. #drupal-off-canvas-wrapper .form-autocomplete.ui-autocomplete-loading {
  124. background-image: url(../../../icons/spinner.gif);
  125. }
  126. [dir="rtl"] #drupal-off-canvas-wrapper .form-autocomplete {
  127. background-position: center left 1px;
  128. }
  129. /* This is the background
      for the autocomplete dropdown. */
    • #drupal-off-canvas-wrapper .ui-autocomplete {
    • margin: 0;
    • padding: 0;
    • list-style: none;
    • border: var(--drupal-off-canvas-input-border);
    • background-color: var(--drupal-off-canvas-input-background-color);
    • box-shadow: 0 1px 1px 0 var(--off-canvas-background-color); /* Ensure edge is visible if appearing over another form element. */
    • }
    • #drupal-off-canvas-wrapper .ui-autocomplete a {
    • display: block;
    • padding: var(--drupal-off-canvas-input-padding);
    • cursor: pointer;
    • color: var(--drupal-off-canvas-input-text-color);
    • font-size: var(--drupal-off-canvas-input-font-size);
    • }
    • #drupal-off-canvas-wrapper .ui-autocomplete a:hover {
    • background-color: #eee;
    • }
    • #drupal-off-canvas-wrapper .ui-autocomplete a:focus,
    • #drupal-off-canvas-wrapper .ui-autocomplete a.ui-state-active {
    • outline: solid 2px currentColor;
    • outline-offset: -2px;
    • }
    • /*
    • * Claro injects a "Loading" autocomplete message that affects the positioning
    • * of the ui-autocomplete dropdown. We remove this to normalize the markup.
    • */
    • #drupal-off-canvas-wrapper .claro-autocomplete__message {
    • display: none;
    • }

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