Skip to content

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

UX: prevent long category names from overflowing on mobile topic list (#31335)

Krisd8b45be25a5a
diff --git a/app/assets/stylesheets/common/base/edit-category.scss b/app/assets/stylesheets/common/base/edit-category.scss
index ed2a94022e8..7abf64588a3 100644
--- a/app/assets/stylesheets/common/base/edit-category.scss
+++ b/app/assets/stylesheets/common/base/edit-category.scss
@@ -15,17 +15,27 @@ div.edit-category {
grid-area: header;
grid-column: 1 / span 2;
display: flex;
+ gap: 1em;
justify-content: space-between;
align-self: start;
background-color: var(--primary-very-low);
padding: 20px;
+ h2 {
+ @include ellipsis;
+ }
+
.category-back {
height: 2em;
align-self: flex-end;
+ flex: 0 0 auto;
}
}
+ .edit-category-title {
+ min-width: 0;
+ }
+
.edit-category-nav {
grid-area: sidebar;
grid-row: 2 / span 3;
diff --git a/app/assets/stylesheets/desktop/topic-list.scss b/app/assets/stylesheets/desktop/topic-list.scss
index ac996747872..ef77f0700f1 100644
--- a/app/assets/stylesheets/desktop/topic-list.scss
+++ b/app/assets/stylesheets/desktop/topic-list.scss
@@ -171,6 +171,7 @@
margin: 0;
.footer-message {
+ overflow-wrap: break-word;
padding-top: 4em;
}
}
diff --git a/app/assets/stylesheets/mobile/topic-list.scss b/app/assets/stylesheets/mobile/topic-list.scss
index a5ddb7b609f..a52bfd301de 100644
--- a/app/assets/stylesheets/mobile/topic-list.scss
+++ b/app/assets/stylesheets/mobile/topic-list.scss
@@ -127,6 +127,7 @@
.badge-category__wrapper {
vertical-align: bottom;
margin-right: 0.5em;
+ max-width: 100%;
}
.badge-wrapper,