You are here

form--password-confirm.css in Drupal 10

Visual styles for the Password widgets.

File

core/themes/claro/css/components/form--password-confirm.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 styles for the Password widgets.
  10. */
  11. :root {
  12. /* Weak */
  13. --password-strength-bar--weak-bg-color: var(--color-maximumred);
  14. --password-strength-bar--weak-border-color: var(--color-maximumred);
  15. /* Fair */
  16. --password-strength-bar--fair-bg-color: var(--color-sunglow);
  17. --password-strength-bar--fair-border-color: #977405;
  18. /* Good */
  19. --password-strength-bar--good-bg-color: var(--color-lightninggreen);
  20. --password-strength-bar--good-border-color: var(--color-lightninggreen);
  21. /* Strong */
  22. --password-strength-bar--strong-bg-color: var(--color-lightninggreen);
  23. --password-strength-bar--strong-border-color: var(--color-lightninggreen);
  24. }
  25. /**
  26. * Password confirm widget styles.
  27. */
  28. .password-confirm {
  29. max-width: 25rem;
  30. }
  31. .password-confirm__password {
  32. margin-bottom: 0;
  33. }
  34. .password-confirm__confirm {
  35. margin-bottom: 0;
  36. }
  37. .js .password-confirm__confirm {
  38. max-height: 10rem;
  39. transition: max-height var(--speed-transition) ease-in-out, margin var(--speed-transition) ease-in-out;
  40. }
  41. @media screen and (prefers-reduced-motion: reduce) {
  42. .js .password-confirm__confirm {
  43. transition: none;
  44. }
  45. }
  46. /* Password confirm widget states. */
  47. .js .is-initial:not(.form-item--error) .form-item__description {
  48. margin-top: 0;
  49. }
  50. .js .is-initial.is-password-empty.is-confirm-empty:not(.form-item--error) .password-confirm__confirm {
  51. display: none;
  52. max-height: 0;
  53. margin-top: 0;
  54. }
  55. /**
  56. * Password strength
  57. *
  58. * Description and strength indicator for the main input.
  59. */
  60. .password-strength {
  61. margin-top: var(--progress-bar-spacing-size);
  62. margin-bottom: var(--progress-bar-spacing-size);
  63. }
  64. .password-strength__track {
  65. height: var(--progress-bar-small-size);
  66. margin-top: var(--progress-bar-spacing-size);
  67. margin-bottom: var(--progress-bar-spacing-size);
  68. border: var(--progress-bar-border-size) solid var(--progress-track-border-color);
  69. border-radius: var(--progress-bar-small-size-radius);
  70. background-color: var(--progress-track-bg-color);
  71. }
  72. .password-strength__track::after {
  73. display: table;
  74. clear: both;
  75. content: "";
  76. }
  77. .password-strength__bar {
  78. min-width: var(--progress-bar-small-size);
  79. height: var(--progress-bar-small-size);
  80. margin: calc(var(--progress-bar-border-size) * -1);
  81. transition: var(--progress-bar-transition);
  82. border: var(--progress-bar-border-size) solid transparent;
  83. border-radius: var(--progress-bar-small-size-radius);
  84. background-color: transparent;
  85. }
  86. @media screen and (prefers-reduced-motion: reduce) {
  87. .password-strength__bar {
  88. transition: none;
  89. }
  90. }
  91. @media screen and (-ms-high-contrast: active) {
  92. .password-strength__bar {
  93. background-color: windowText;
  94. }
  95. .is-initial .password-strength__bar {
  96. border-color: transparent;
  97. background-color: transparent;
  98. }
  99. }
  100. .password-strength__title {
  101. overflow: hidden;
  102. margin-top: var(--progress-bar-spacing-size);
  103. margin-bottom: var(--progress-bar-spacing-size);
  104. color: var(--progress-bar-description-color);
  105. font-size: var(--progress-bar-description-font-size);
  106. line-height: var(--space-m);
  107. }
  108. .password-strength__text {
  109. color: var(--progress-bar-label-color);
  110. font-weight: bold;
  111. }
  112. /* Password strength states */
  113. .password-strength__bar.is-weak {
  114. border-color: var(--password-strength-bar--weak-border-color);
  115. background-color: var(--password-strength-bar--weak-bg-color);
  116. }
  117. .password-strength__bar.is-fair {
  118. border-color: var(--password-strength-bar--fair-border-color);
  119. background-color: var(--password-strength-bar--fair-bg-color);
  120. }
  121. .password-strength__bar.is-good {
  122. border-color: var(--password-strength-bar--good-border-color);
  123. background-color: var(--password-strength-bar--good-bg-color);
  124. }
  125. .password-strength__bar.is-strong {
  126. border-color: var(--password-strength-bar--strong-border-color);
  127. background-color: var(--password-strength-bar--strong-bg-color);
  128. }
  129. @media (forced-colors: active) {
  130. .password-strength__bar.is-weak,
  131. .password-strength__bar.is-fair,
  132. .password-strength__bar.is-good,
  133. .password-strength__bar.is-strong {
  134. background-color: canvastext;
  135. }
  136. .is-initial .password-strength__bar {
  137. border-color: transparent;
  138. background-color: transparent;
  139. }
  140. }
  141. .is-initial.is-password-empty .password-strength__title {
  142. margin: 0;
  143. line-height: 0;
  144. }
  145. /**
  146. * Password match message.
  147. *
  148. * This is the description-like message on the bottom of the password confirm
  149. * input.
  150. */
  151. .password-match-message {
  152. margin-top: var(--progress-bar-spacing-size);
  153. margin-bottom: var(--progress-bar-spacing-size);
  154. color: var(--progress-bar-description-color);
  155. font-size: var(--progress-bar-description-font-size);
  156. }
  157. .password-match-message__text {
  158. color: var(--progress-bar-label-color);
  159. font-weight: bold;
  160. }
  161. .is-confirm-empty .password-match-message {
  162. visibility: hidden;
  163. }
  164. /**
  165. * Password suggestions.
  166. *
  167. * Tips for improving the password.
  168. */
  169. .password-suggestions {
  170. margin-top: var(--progress-bar-spacing-size);
  171. margin-bottom: var(--space-xs);
  172. padding: var(--space-m);
  173. color: var(--progress-bar-description-color);
  174. border: 1px solid var(--color-gray-200);
  175. border-radius: var(--base-border-radius);
  176. background-color: var(--color-white);
  177. box-shadow: var(--details-box-shadow);
  178. font-size: var(--progress-bar-description-font-size);
  179. }
  180. .password-suggestions__tips {
  181. margin: var(--space-xs) 0 0 var(--space-l); /* LTR */
  182. }
  183. [dir="rtl"] .password-suggestions__tips {
  184. margin-right: var(--space-l);
  185. margin-left: 0;
  186. }