Skip to content

Commit

Permalink
Refactor content-list-item__description
Browse files Browse the repository at this point in the history
Remove unnecessary `p` tag and set margin back to default `auto`, which is needed for the truncate to work properly.
  • Loading branch information
kasperbirch1 committed May 3, 2024
1 parent 926b9b9 commit 0f1e1d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/stories/Library/content-list-item/ContentListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ export const ContentListItem: React.FC<ContentListItemProps> = ({
)}
<div className="content-list-item__date">{date}</div>
<h2 className="content-list-item__title">{title}</h2>
<div className="content-list-item__description">
<p>{description}</p>
</div>
<div className="content-list-item__description">{description}</div>
<div className="content-list-item__content-bottom-container">
<p className="content-list-item__location">{location}</p>
</div>
Expand Down
11 changes: 3 additions & 8 deletions src/stories/Library/content-list-item/content-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ $_stacked-reduce-width: 20px;
.content-list-item__description {
grid-area: description;
margin-bottom: $s-lg;
p {
@include text-ellipsis-truncation(3);
}
@include text-ellipsis-truncation(3);
}

.content-list-item__content-bottom-container {
Expand Down Expand Up @@ -211,12 +209,9 @@ $_stacked-reduce-width: 20px;
}

.content-list-item__description {
margin-bottom: unset;
margin: auto;
grid-area: description;

p {
@include text-ellipsis-truncation(2);
}
@include text-ellipsis-truncation(2);
}

.content-list-item__content-right-container {
Expand Down

0 comments on commit 0f1e1d2

Please sign in to comment.