mirror of
https://github.com/discourse/discourse.git
synced 2025-09-12 21:10:47 +08:00
Prevent long category names from breaking topic/category list layouts
This commit is contained in:
parent
f8856f3d7a
commit
e2a524550c
3 changed files with 44 additions and 2 deletions
|
@ -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,
|
||||
.latest-topic-list-item.visited,
|
||||
.category-topic-link.visited {
|
||||
|
@ -111,6 +141,12 @@
|
|||
padding-left: 5px;
|
||||
}
|
||||
|
||||
span.badge-category {
|
||||
.category-name {
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.topic-excerpt {
|
||||
font-size: $font-down-1;
|
||||
margin-top: 5px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue