form.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. }