form.css

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

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