Skip to content

Commit c2bfd5c

Browse files
authored
Merge pull request internetarchive#11080 from krishnaGauss/11037/fix/global-list-render
Fix title overflows in new list cards
2 parents 15f7efe + 6feaf80 commit c2bfd5c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

openlibrary/templates/lists/list_follow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$ count = cached_info["count"]
1111
<div class="list-follow-card">
1212
<a class="list-follow-card__header" href="$list.get_url()">
13-
<div class="list-follow-card__title">$cached_info["title"]</div>
13+
<div class="list-follow-card__title" title="${cached_info['title']}">$cached_info['title']</div>
1414
<div class="list-follow-card__num-books">
1515
$ungettext("%(count)d book", "%(count)d books", count, count=count)
1616
</div>

static/css/components/list-follow.less

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
align-items: center;
4848
padding: 7px 10px;
4949
border-radius: 0 0 4px 4px;
50+
width: 100%;
5051
a& {
5152
text-decoration: none;
5253
}
@@ -130,10 +131,18 @@
130131
font-weight: bold;
131132
font-size: @font-size-label-large;
132133
color: @black;
133-
134-
white-space: nowrap;
134+
width: 100%;
135+
max-height: 2.8em;
135136
overflow: hidden;
136137
text-overflow: ellipsis;
138+
line-height: 1.4em;
139+
white-space: normal;
140+
word-break: break-word;
141+
position: relative;
142+
text-align: center;
143+
display: -webkit-box;
144+
-webkit-line-clamp: 2;
145+
-webkit-box-orient: vertical;
137146
}
138147

139148
&__bottom-community {

0 commit comments

Comments
 (0)