diff --git a/docroot/modules/humsci/hs_layouts/patterns/vertical-button-card/vertical-button-card.html.twig b/docroot/modules/humsci/hs_layouts/patterns/vertical-button-card/vertical-button-card.html.twig index f3e0d5d3cb..997892b50c 100644 --- a/docroot/modules/humsci/hs_layouts/patterns/vertical-button-card/vertical-button-card.html.twig +++ b/docroot/modules/humsci/hs_layouts/patterns/vertical-button-card/vertical-button-card.html.twig @@ -8,7 +8,7 @@ {% endif %} - {% if title or description %} + {% if title or description or button %}
{% if title %}
@@ -23,12 +23,12 @@ {% if description %}
{{ description }}
{% endif %} -
- {% endif %} - {% if button %} - {% set link = button.field_hs_postcard_link[0] %} - {{ link['#title'] }} + {% if button %} + {% set link = button.field_hs_postcard_link[0] %} + {{ link['#title'] }} + {% endif %} +
{% endif %} diff --git a/docroot/themes/humsci/humsci_basic/src/scss/components/_vertical-button-card.scss b/docroot/themes/humsci/humsci_basic/src/scss/components/_vertical-button-card.scss index e28b67f9f5..25196e0841 100644 --- a/docroot/themes/humsci/humsci_basic/src/scss/components/_vertical-button-card.scss +++ b/docroot/themes/humsci/humsci_basic/src/scss/components/_vertical-button-card.scss @@ -2,14 +2,9 @@ position: relative; .hb-card__graphics { - &, .hb-raised-cards & { - margin-bottom: hb-calculate-rems(32px); - } - img { width: 100%; } - } .hb-card__title:only-child { @@ -50,20 +45,34 @@ .hb-card__graphics { padding: hb-calculate-rems(24px) hb-spacing-width('sm') 0; + + &, .hb-raised-cards & { + margin-bottom: hb-calculate-rems(32px); + } } .hb-card__content { padding: hb-calculate-rems(32px) hb-spacing-width('sm'); + flex-grow: 1; + + &:has(.hs-button) { + padding-bottom: 0; + + .hb-card__description { + margin-bottom: hb-calculate-rems(16px); + } + } } .hs-button { @include hb-secondary-button; position: relative; - width: 100%; border-width: 0; border-top-width: 2px; margin-top: auto; + margin-left: hb-calculate-rems(-24px); + margin-right: hb-calculate-rems(-24px); // Warbler color pairing override. .ht-pairing-warbler & { @@ -80,32 +89,13 @@ padding-top: 0; } } - - &:has(.hs-button) { - .hb-card__content { - padding-bottom: hb-calculate-rems(16px); - } - } } @include hb-colorful { .hb-card__graphics { &, .hb-raised-cards & { - margin-top: -40%; - - @include grid-media('md') { - .paragraph--type--hs-collection .item-per-row--2 & { - margin-top: -50%; - } - - .paragraph--type--hs-collection .item-per-row--3 & { - margin-top: -65%; - } - - .paragraph--type--hs-collection .item-per-row--4 & { - margin-top: -75%; - } - } + padding: 0 hb-calculate-rems(36px); + margin-bottom: hb-calculate-rems(-40px); } } @@ -113,14 +103,11 @@ color: var(--palette--secondary); } - .hb-card__content-wrapper { + .hb-card__content { padding: hb-calculate-rems(32px) hb-calculate-rems(36px); border: 2px solid var(--palette--tertiary-highlight); box-shadow: hb-calculate-rems(1px) hb-calculate-rems(7.5px) hb-calculate-rems(35px) color-mix(in srgb, var(--palette--black) 10%, transparent); - - @include hb-themes(('airy', 'colorful')) { - background-color: var(--palette--white); - } + background-color: var(--palette--white); .hb-raised-cards--uniform-height & { height: 100%; @@ -129,18 +116,26 @@ justify-content: flex-start; } - .hb-card__content { - padding: 0; + .hb-raised-cards & { + padding: hb-calculate-rems(32px) hb-calculate-rems(36px); } } &:has(.hb-card__graphics) { - padding-top: 40%; + .hb-card__content { + padding-top: hb-calculate-rems(62px); + + .hb-raised-cards & { + padding-top: hb-calculate-rems(62px); + } + } + } - .paragraph--type--hs-collection .item-per-row--2 &, - .paragraph--type--hs-collection .item-per-row--3 &, - .paragraph--type--hs-collection .item-per-row--4 & { - padding-top: 30%; + .hb-card__content-wrapper { + .hb-raised-cards--uniform-height & { + flex-grow: 1; + display: flex; + flex-direction: column; } }