Prevent long category names from breaking topic/category list layouts

This commit is contained in:
Kris 2018-02-26 14:20:32 -05:00
parent f8856f3d7a
commit e2a524550c
3 changed files with 44 additions and 2 deletions

View File

@ -17,6 +17,36 @@
} }
} }
.categories-and-latest {
.latest-topic-list {
span.badge-category {
.category-name {
max-width: 25vw;
@media screen and (max-width: 630px) {
max-width: 65vw; //single-column
}
}
}
}
}
.category-list {
.category-name {
display: block;
max-width: 35vw;
overflow: hidden;
text-overflow: ellipsis;
@media screen and (max-width: 630px) {
max-width: 75vw; //single-column
}
}
&.with-topics {
.category-name {
max-width: 40vw;
}
}
}
.topic-list-item.visited, .topic-list-item.visited,
.latest-topic-list-item.visited, .latest-topic-list-item.visited,
.category-topic-link.visited { .category-topic-link.visited {
@ -111,6 +141,12 @@
padding-left: 5px; padding-left: 5px;
} }
span.badge-category {
.category-name {
max-width: 150px;
}
}
.topic-excerpt { .topic-excerpt {
font-size: $font-down-1; font-size: $font-down-1;
margin-top: 5px; margin-top: 5px;

View File

@ -20,8 +20,15 @@
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
display: flex;
align-items: baseline;
.badge-category { .badge-category {
display: inline-flex;
.category-name {
text-overflow: ellipsis;
overflow: hidden;
}
.d-icon { .d-icon {
margin-right: 3px; margin-right: 3px;
} }
@ -98,7 +105,7 @@
span.badge-category { span.badge-category {
color: $primary; color: $primary;
padding: 3px; padding: 1px 3px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -423,7 +423,6 @@ nav.post-controls {
clear: left; clear: left;
padding: 20px 0 15px 0; padding: 20px 0 15px 0;
table { table {
table-layout: fixed;
margin-top: 10px; margin-top: 10px;
} }