_login.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. @mixin login-fullscreen-background() {
  2. @at-root {
  3. :root {
  4. --w-login-fullscreen-background: radial-gradient(
  5. 100% 300.28% at 100% 0%,
  6. theme('colors.primary.DEFAULT') 0%,
  7. theme('colors.primary.DEFAULT') 32.94%,
  8. theme('colors.primary.DEFAULT') 49.9%,
  9. theme('colors.primary.DEFAULT') 50.2%,
  10. theme('colors.secondary.DEFAULT') 100%
  11. );
  12. }
  13. }
  14. // support older browsers that do not support radial gradient 'at' usage
  15. background: theme('colors.surface-menus');
  16. /* stylelint-disable-next-line declaration-block-no-duplicate-properties */
  17. background: var(
  18. --w-login-fullscreen-background,
  19. theme('colors.primary.DEFAULT')
  20. );
  21. }
  22. .login {
  23. @include login-fullscreen-background;
  24. color: theme('colors.text-label');
  25. .wrapper {
  26. align-items: center;
  27. display: flex;
  28. flex-direction: column;
  29. height: auto;
  30. justify-content: center;
  31. padding: min(theme('spacing.4'), 5vh) min(theme('spacing.4'), 5vw);
  32. min-height: 100vh;
  33. }
  34. .messages {
  35. background: none;
  36. margin-bottom: theme('spacing.8');
  37. ul {
  38. @include unlist();
  39. li {
  40. border-radius: theme('borderRadius.sm');
  41. margin-bottom: theme('spacing.2');
  42. }
  43. }
  44. }
  45. .content-wrapper {
  46. // border style needed in forced color mode
  47. border: 3px solid transparent;
  48. height: auto;
  49. float: none;
  50. padding: theme('spacing.10') theme('spacing.12');
  51. background: theme('colors.surface-page');
  52. box-shadow: theme('boxShadow.md');
  53. border-radius: theme('borderRadius.md');
  54. margin-bottom: 15vh; // should appear slightly above centre
  55. max-width: calc(theme('spacing.32') * 3.15);
  56. @include media-breakpoint-up(sm) {
  57. max-width: calc(theme('spacing.32') * 3.5);
  58. padding: theme('spacing.12') theme('spacing.14');
  59. }
  60. }
  61. h1 {
  62. @apply w-h1;
  63. margin-top: 0;
  64. margin-bottom: theme('spacing.8');
  65. text-align: center;
  66. }
  67. .button,
  68. .w-field__label {
  69. width: 100%;
  70. font-size: theme('fontSize.16');
  71. font-weight: theme('fontWeight.bold');
  72. }
  73. .w-field__input {
  74. padding: 0; // reset padding for field not used inside the admin interface
  75. }
  76. .w-field__wrapper {
  77. margin-bottom: theme('spacing.6');
  78. }
  79. .skiplink {
  80. width: auto;
  81. }
  82. .reset-password {
  83. display: block;
  84. // bring in reset password link tight to the form
  85. margin: calc(-1 * theme('spacing.4')) 0 theme('spacing.8');
  86. }
  87. .remember-me {
  88. margin: theme('spacing.4') 0;
  89. }
  90. .form-actions {
  91. // no need for margin bottom due to padding on content-wrapper
  92. margin-top: theme('spacing.8');
  93. text-align: center;
  94. .button-longrunning {
  95. &-active {
  96. justify-content: center;
  97. }
  98. }
  99. }
  100. .login-form .w-field__errors {
  101. // for the login form, we rely on the non-field error only.
  102. display: none;
  103. }
  104. .login-logo {
  105. margin: theme('spacing.8') auto 0;
  106. width: theme('spacing.8');
  107. }
  108. @media (forced-colors: active) and (prefers-color-scheme: dark) {
  109. .login-logo-img {
  110. filter: invert(100%);
  111. }
  112. }
  113. }