Skip to content

Commit

Permalink
fix(ui): gracefully handle lengthy titles & long words in overviews (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatLady committed Mar 31, 2021
1 parent 55b18f0 commit d8bcb99
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/TitleCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,16 @@ const TitleCard: React.FC<TitleCardProps> = ({
>
{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}
</h1>
<div
Expand All @@ -236,6 +245,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
display: '-webkit-box',
overflow: 'hidden',
WebkitBoxOrient: 'vertical',
wordBreak: 'break-word',
}}
>
{summary}
Expand Down

0 comments on commit d8bcb99

Please sign in to comment.