Simplifying category overflow on category pages

This commit is contained in:
Kris 2018-02-27 13:10:28 -05:00
parent 9b680fc45c
commit e32691a3e9
4 changed files with 24 additions and 30 deletions

View File

@ -17,36 +17,7 @@
} }
} }
.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: inline-block;
max-width: 30vw;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: text-bottom;
@media screen and (max-width: 630px) {
max-width: 65vw; //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,

View File

@ -1,3 +1,15 @@
.category-list {
table-layout: fixed;
.category-name {
display: inline-block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: text-top;
line-height: $line-height-medium;
}
}
.category-boxes, .category-boxes-with-topics { .category-boxes, .category-boxes-with-topics {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -23,8 +23,15 @@
} }
.main-link { .main-link {
@extend .topic-list-main-link; @extend .topic-list-main-link;
flex: 15; flex: 0 1 auto;
max-width: 65%;
font-size: $font-0; font-size: $font-0;
.badge-wrapper {
max-width: 100%;
.badge-category-bg {
flex-shrink: 0;
}
}
.top-row { .top-row {
margin-bottom: 0.1em; margin-bottom: 0.1em;

View File

@ -232,6 +232,10 @@ tr.category-topic-link {
} }
} }
.category-name {
max-width: 80vw;
}
.category-topic-link .main-link, .subcategories-list td, .category-description td { .category-topic-link .main-link, .subcategories-list td, .category-description td {
padding-left: 10px; padding-left: 10px;
} }