From 0f1e1d2e446581477b3f05b7d81429b33575ace9 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Fri, 3 May 2024 15:17:56 +0200 Subject: [PATCH] Refactor `content-list-item__description` Remove unnecessary `p` tag and set margin back to default `auto`, which is needed for the truncate to work properly. --- .../Library/content-list-item/ContentListItem.tsx | 4 +--- .../Library/content-list-item/content-list-item.scss | 11 +++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/stories/Library/content-list-item/ContentListItem.tsx b/src/stories/Library/content-list-item/ContentListItem.tsx index 1552528ba..c8b6b30e9 100644 --- a/src/stories/Library/content-list-item/ContentListItem.tsx +++ b/src/stories/Library/content-list-item/ContentListItem.tsx @@ -47,9 +47,7 @@ export const ContentListItem: React.FC = ({ )}
{date}

{title}

-
-

{description}

-
+
{description}

{location}

diff --git a/src/stories/Library/content-list-item/content-list-item.scss b/src/stories/Library/content-list-item/content-list-item.scss index 587d77c48..4de663fe7 100644 --- a/src/stories/Library/content-list-item/content-list-item.scss +++ b/src/stories/Library/content-list-item/content-list-item.scss @@ -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 { @@ -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 {