Skip to content

Commit 6feaf80

Browse files
committed
solved the css bug for global list renders
1 parent 31c1ce3 commit 6feaf80

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
}
@@ -116,10 +117,18 @@
116117
font-weight: bold;
117118
font-size: @font-size-label-large;
118119
color: @black;
119-
120-
white-space: nowrap;
120+
width: 100%;
121+
max-height: 2.8em;
121122
overflow: hidden;
122123
text-overflow: ellipsis;
124+
line-height: 1.4em;
125+
white-space: normal;
126+
word-break: break-word;
127+
position: relative;
128+
text-align: center;
129+
display: -webkit-box;
130+
-webkit-line-clamp: 2;
131+
-webkit-box-orient: vertical;
123132
}
124133

125134
&__num-books {

0 commit comments

Comments
 (0)