Skip to content

Commit

Permalink
UI: allow card description to take 3 lines before wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmnGhanem committed Jun 1, 2022
1 parent 40ccb87 commit ab5105b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/ProjectCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ const ProjectCard = ({ name, summary, ownerName, multiParentName }) => {
{name}
</Card.Header>
<Card.Meta className={styles.cardText}>{ownerName}</Card.Meta>
<Card.Description className={styles.cardText}>{summary}</Card.Description>
<Card.Description className={styles.cardDescription}>
{summary}
</Card.Description>
</Card.Content>
</Card>
</Link>
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/ProjectCard/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@
white-space:nowrap;
text-overflow: ellipsis;
}

.cardDescription {
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical
}

0 comments on commit ab5105b

Please sign in to comment.