Skip to content

A platform for community discussion. Free, open, simple.

UX: Fix excess line breaks in login modal alerts (#12104)

Kris355b8f69afb7
diff --git a/app/assets/stylesheets/common/base/login.scss b/app/assets/stylesheets/common/base/login.scss
index 8b8cf5ace16..12e18fc95b3 100644
--- a/app/assets/stylesheets/common/base/login.scss
+++ b/app/assets/stylesheets/common/base/login.scss
@@ -27,18 +27,6 @@
}
}
-.d-modal.login-modal {
- #modal-alert:empty {
- display: none;
- }
-
- #modal-alert:not(:empty) {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
-}
-
// Create Account + Login
.d-modal.create-account,
.d-modal.login-modal {
@@ -56,6 +44,19 @@
right: 1em;
z-index: z("max");
}
+ #modal-alert {
+ box-sizing: border-box;
+ display: inline-block;
+ // if you want to use flexbox here make sure child elements like <b> don't cause line breaks
+ padding: 1em 3.5em 1em 1em; // large right padding to make sure long text isn't under the close button
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: 0;
+ min-height: 35px;
+ }
+ #modal-alert:empty {
+ display: none;
+ }
.login-welcome-header {
z-index: z("modal", "content");
display: grid;
diff --git a/app/assets/stylesheets/desktop/login.scss b/app/assets/stylesheets/desktop/login.scss
index 49d3654be08..accab49f584 100644
--- a/app/assets/stylesheets/desktop/login.scss
+++ b/app/assets/stylesheets/desktop/login.scss
@@ -13,9 +13,6 @@
}
}
}
- #modal-alert {
- padding: 15px 16px;
- }
.btn-flat.btn.modal-close svg {
color: rgba(var(--primary-rgb), 0.5);
&:hover {
@@ -52,13 +49,6 @@
}
}
- #modal-alert {
- max-width: 100%;
- margin-bottom: 0;
- padding: 8px 50px 8px 16px;
- min-height: 35px;
- }
-
.tip {
display: block;
overflow: hidden;