form.css

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

Main form and form item styles.

File

core/themes/claro/css/components/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. * Main form and form item styles.
  10. */
  11. :-ms-input-placeholder {
  12. opacity: 1;
  13. color: #75767b;
  14. }
  15. ::placeholder {
  16. opacity: 1;
  17. color: #75767b;
  18. }
  19. /* IE 10 and 11 needs this set as important. */
  20. :-ms-input-placeholder {
  21. color: #75767b !important;
  22. }
  23. /**
  24. * General form item.
  25. */
  26. .form-item {
  27. margin-top: 1.5rem;
  28. margin-bottom: 1.5rem;
  29. }
  30. /**
  31. * When a table row or a container-inline has a single form item, prevent it
  32. * from adding unnecessary extra spacing.
  33. * If it has multiple form items, allow spacing between them, overriding Classy.
  34. */
  35. tr .form-item,
  36. .container-inline .form-item {
  37. margin-top: 0.75rem;
  38. margin-bottom: 0.75rem;
  39. }
  40. /**
  41. * Form element label.
  42. */
  43. .form-item__label {
  44. display: table;
  45. margin-top: 0.25rem; /* 4px */
  46. margin-bottom: 0.25rem; /* 4px */
  47. font-size: 0.889rem; /* ~14px */
  48. font-weight: bold;
  49. line-height: 1.125rem;
  50. }
  51. .form-item__label--multiple-value-form {
  52. margin-top: 0;
  53. margin-bottom: 0;
  54. font-size: inherit;
  55. font-weight: inherit;
  56. line-height: inherit;
  57. }
  58. .form-item__label[for] {
  59. cursor: pointer;
  60. }
  61. .form-item__label.option {
  62. display: inline;
  63. font-weight: normal;
  64. }
  65. /* Label states. */
  66. .form-item__label.has-error {
  67. color: #dc2323;
  68. }
  69. .form-item__label.option.has-error {
  70. color: inherit;
  71. }
  72. .form-item__label.is-disabled {
  73. cursor: default; /* @todo ...or auto? */
  74. color: #828388;
  75. }
  76. .form-item__label.form-required::after,
  77. .fieldset__label.form-required::after {
  78. display: inline-block;
  79. margin-right: 0.15em;
  80. margin-left: 0.15em;
  81. content: "*";
  82. color: #dc2323;
  83. font-size: 0.875rem;
  84. }
  85. /**
  86. * Form item description.
  87. */
  88. .form-item__description {
  89. margin-top: 0.375rem; /* 6px */
  90. margin-bottom: 0.375rem; /* 6px */
  91. color: #55565b;
  92. font-size: 0.79rem; /* ~13px */
  93. line-height: 1.0625rem; /* 17px */
  94. }
  95. /* Description states. */
  96. .form-item__description.is-disabled {
  97. color: #828388;
  98. }
  99. /**
  100. * Error message (Inline form errors).
  101. */
  102. .form-item__error-message {
  103. margin-top: 0.375rem; /* 6px */
  104. margin-bottom: 0.375rem; /* 6px */
  105. color: #dc2323;
  106. font-size: 0.79rem; /* ~13px */
  107. font-weight: normal;
  108. line-height: 1.0625rem; /* 17px */
  109. }
  110. .form-item__prefix.is-disabled,
  111. .form-item__suffix.is-disabled {
  112. color: #828388;
  113. }
  114. /* Add some spacing so that the focus ring and suffix don't overlap. */
  115. @media screen and (min-width: 37.5625rem) {
  116. .form-item__suffix {
  117. margin-left: 0.5rem; /* LTR */
  118. }
  119. [dir="rtl"] .form-item__suffix {
  120. margin-right: 0.5rem;
  121. margin-left: 0;
  122. }
  123. }
  124. /**
  125. * Form actions.
  126. */
  127. .form-actions {
  128. display: flex;
  129. flex-wrap: wrap;
  130. align-items: flex-start;
  131. margin-top: 1rem;
  132. margin-bottom: 1rem;
  133. }
  134. .form-actions .button,
  135. .form-actions .action-link {
  136. margin-top: 1rem;
  137. margin-bottom: 1rem;
  138. }
  139. .form-actions .ajax-progress--throbber {
  140. -ms-grid-row-align: center;
  141. align-self: center;
  142. }
  143. /**
  144. * Password module.
  145. *
  146. * @legacy
  147. * @todo These should be in a standalone component file.
  148. */
  149. .confirm-parent,
  150. .password-parent {
  151. overflow: visible;
  152. width: auto;
  153. }
  154. .form-item-options-group-info-identifier,
  155. .form-item-pass .description {
  156. clear: both;
  157. }
  158. /**
  159. * Custom label placement for editor filter format select.
  160. */
  161. .form-item--editor-format {
  162. display: flex;
  163. flex-wrap: wrap;
  164. align-items: center;
  165. max-width: 100%;
  166. }
  167. .form-item--editor-format .form-item__label,
  168. .form-item--editor-format .form-item__prefix,
  169. .form-item--editor-format .form-item__suffix,
  170. .form-item--editor-format .form-element--editor-format {
  171. min-width: 1px;
  172. }
  173. .form-item--editor-format .form-item__label,
  174. .form-item--editor-format .form-item__prefix,
  175. .form-item--editor-format .form-item__suffix {
  176. margin-right: 0.5rem; /* LTR */
  177. }
  178. [dir="rtl"] .form-item--editor-format .form-item__label,
  179. [dir="rtl"] .form-item--editor-format .form-item__prefix,
  180. [dir="rtl"] .form-item--editor-format .form-item__suffix {
  181. margin-right: 0;
  182. margin-left: 0.5rem;
  183. }
  184. .form-item--editor-format .form-item__description,
  185. .form-item--editor-format .form-item__error-message {
  186. flex: 0 1 100%;
  187. min-width: 1px;
  188. }
  189. /**
  190. * Improve form element usability on narrow devices.
  191. *
  192. * @legacy
  193. */
  194. @media screen and (max-width: 37.5rem) {
  195. .password-strength {
  196. width: 100%;
  197. }
  198. div.form-item div.password-suggestions {
  199. float: none;
  200. }
  201. }
  202. /**
  203. * Prevent regression due to explicit line-heights applied to these elements in
  204. * normalize.css 7.0.0.
  205. */
  206. button {
  207. line-height: 1.125rem;
  208. }
  209. input,
  210. optgroup {
  211. line-height: 1.5rem;
  212. }
  213. /**
  214. * Prevent regression due to -webkit-appearance being set to button in
  215. * normalize.css 4.1.0.
  216. */
  217. ::-webkit-file-upload-button {
  218. -webkit-appearance: push-button;
  219. }

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