Skip to content

Commit

Permalink
Merge pull request #386 from zendesk/afernandez/article-title
Browse files Browse the repository at this point in the history
fix: ellipsis for very long titles
  • Loading branch information
albertfdp authored Jul 19, 2023
2 parents 014b3fa + a11089c commit 0dc3db5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,8 @@ ul {
}
.recent-activity-item-link {
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
}
.recent-activity-item-meta {
color: $text_color;
Expand Down Expand Up @@ -1498,6 +1500,7 @@ ul {
}
.category-content {
flex: 1;
max-width: 100%;
}
@media (min-width: 1024px) {
.category-content {
Expand All @@ -1518,6 +1521,7 @@ ul {
}
.section-tree .section {
flex: initial;
max-width: 100%;
}
@media (min-width: 768px) {
.section-tree .section {
Expand All @@ -1540,6 +1544,8 @@ ul {
.article-list-item {
font-size: 16px;
padding: 15px 0;
text-overflow: ellipsis;
overflow: hidden;
}
.article-list-item a {
color: $text_color;
Expand All @@ -1557,6 +1563,7 @@ ul {
}
.section-content {
flex: 1;
max-width: 100%;
}
@media (min-width: 1024px) {
.section-content {
Expand Down Expand Up @@ -1639,6 +1646,11 @@ ul {
.article-author {
margin-bottom: 10px;
}
.article-title {
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
@media (min-width: 768px) {
.article-title {
flex-basis: 100%; /* Take entire row */
Expand Down Expand Up @@ -1811,6 +1823,7 @@ ul {
border: 0;
flex: 0 0 17%;
height: auto;
max-width: 17%;
}
}
.article-relatives {
Expand Down Expand Up @@ -1899,6 +1912,8 @@ ul {
display: block;
margin-top: 10px;
margin-bottom: 16px;
overflow: hidden;
text-overflow: ellipsis;
}

.recent-articles li,
Expand Down
7 changes: 7 additions & 0 deletions styles/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
}

&-title {
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;

@include tablet {
flex-basis: 100%; /* Take entire row */
}
Expand Down Expand Up @@ -115,6 +119,7 @@
border: 0;
flex: 0 0 17%;
height: auto;
max-width: 17%;
}

border-bottom: 1px solid $low-contrast-border-color;
Expand Down Expand Up @@ -220,6 +225,8 @@
display: block;
margin-top: 10px;
margin-bottom: 16px;
overflow: hidden;
text-overflow: ellipsis;
}
}

Expand Down
4 changes: 4 additions & 0 deletions styles/_category.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}

flex: 1;
max-width: 100%;
}
}

Expand All @@ -24,6 +25,7 @@
.section {
@include tablet { flex: 0 0 45%; /* Two columns for tablet and desktop. Leaving 5% separation between columns */ }
flex: initial;
max-width: 100%;
}

&-title {
Expand All @@ -44,6 +46,8 @@
&-item {
font-size: $font-size-bigger;
padding: 15px 0;
text-overflow: ellipsis;
overflow: hidden;

a { color: $text_color; }
}
Expand Down
2 changes: 2 additions & 0 deletions styles/_recent-activity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

&-item-link {
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
}

&-item-meta {
Expand Down
1 change: 1 addition & 0 deletions styles/_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
flex: 0 0 80%;
}
flex: 1;
max-width: 100%
}

&-subscribe button {
Expand Down

0 comments on commit 0dc3db5

Please sign in to comment.