fix(ui): gracefully handle lengthy titles & long words in overviews (#1338)

This commit is contained in:
TheCatLady
2021-03-31 06:19:14 -04:00
committed by GitHub
parent 55b18f0023
commit d8bcb99b2f

View File

@@ -221,7 +221,16 @@ const TitleCard: React.FC<TitleCardProps> = ({
> >
{year && <div className="text-sm">{year}</div>} {year && <div className="text-sm">{year}</div>}
<h1 className="text-xl leading-tight whitespace-normal"> <h1
className="text-xl leading-tight whitespace-normal"
style={{
WebkitLineClamp: 3,
display: '-webkit-box',
overflow: 'hidden',
WebkitBoxOrient: 'vertical',
wordBreak: 'break-word',
}}
>
{title} {title}
</h1> </h1>
<div <div
@@ -236,6 +245,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
display: '-webkit-box', display: '-webkit-box',
overflow: 'hidden', overflow: 'hidden',
WebkitBoxOrient: 'vertical', WebkitBoxOrient: 'vertical',
wordBreak: 'break-word',
}} }}
> >
{summary} {summary}