From 62639ad8dca5aecfcc9efec47965360d4ef593e9 Mon Sep 17 00:00:00 2001 From: Aditya Unnithan Date: Thu, 5 Oct 2023 10:37:17 +0100 Subject: [PATCH] Change widths of components inside card to be their contents width --- src/components/card/_card.scss | 6 ++++++ src/components/card/_macro.njk | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/components/card/_card.scss b/src/components/card/_card.scss index e258508cfd..eafbf0966d 100644 --- a/src/components/card/_card.scss +++ b/src/components/card/_card.scss @@ -5,6 +5,12 @@ &__link { display: flex; flex-direction: column; + margin-bottom: 1rem; + width: fit-content; + } + + &__remove--margin { + margin-bottom: 0; } &__image--reorder { diff --git a/src/components/card/_macro.njk b/src/components/card/_macro.njk index 350826fce3..42516328a8 100644 --- a/src/components/card/_macro.njk +++ b/src/components/card/_macro.njk @@ -10,7 +10,7 @@ {%- if params.url -%} {%- endif -%} - + {{ params.title }} {% if params.image.smallSrc %} @@ -24,15 +24,15 @@ {%- else -%} - - {%- if params.url -%} - - {%- endif -%} + {%- if params.url -%} + + {%- endif -%} + {{ params.title }} - {%- if params.url -%} - - {%- endif -%} - + + {%- if params.url -%} + + {%- endif -%} {%- endif -%}