diff --git a/components/01-atoms/controls/cta/_yds-cta.scss b/components/01-atoms/controls/cta/_yds-cta.scss index 27a94750b..aa1ba3fd6 100644 --- a/components/01-atoms/controls/cta/_yds-cta.scss +++ b/components/01-atoms/controls/cta/_yds-cta.scss @@ -246,4 +246,8 @@ $cta-outline-weights: ( display: flex; gap: var(--size-spacing-7); margin-bottom: var(--size-spacing-7); + + .component-wrapper--no-bottom-margin & { + margin-bottom: 0; + } } diff --git a/components/01-atoms/controls/text-link/_yds-text-link.scss b/components/01-atoms/controls/text-link/_yds-text-link.scss index 66422e2bd..195bb1437 100644 --- a/components/01-atoms/controls/text-link/_yds-text-link.scss +++ b/components/01-atoms/controls/text-link/_yds-text-link.scss @@ -214,11 +214,15 @@ $global-link-themes: map.deep-get(tokens.$tokens, 'global-themes'); .link { &[data-link-style='underline'] { @include link; + + // set default --color-text-shadow + --color-text-shadow: var(--color-basic-white); } &[data-link-style='underline-with-icon'] { @include link; + // set default --color-text-shadow --color-text-shadow: var(--color-basic-white); display: flex; @@ -235,4 +239,9 @@ $global-link-themes: map.deep-get(tokens.$tokens, 'global-themes'); &[data-link-style='no-underline-animation'] { @include plain-link; } + + &[data-link-type='email'] { + cursor: pointer; + text-underline-offset: 0.22rem; + } } diff --git a/components/01-atoms/controls/text-link/yds-text-link.twig b/components/01-atoms/controls/text-link/yds-text-link.twig index d31afbfb1..97edbd13d 100644 --- a/components/01-atoms/controls/text-link/yds-text-link.twig +++ b/components/01-atoms/controls/text-link/yds-text-link.twig @@ -26,6 +26,11 @@ {% set link__modifiers = ['with-icon'] %} {% endif %} +{# If link type is email, set the link__style here. #} +{% if link__type == 'email' %} + {% set link__style = 'no-underline-animation' %} +{% endif %} + {% set link__attributes = link__attributes|merge({ 'data-link-style': link__style|default('underline'), 'data-link-type': link__type|default('normal'), diff --git a/components/02-molecules/text-with-image/_yds-text-with-image.scss b/components/02-molecules/text-with-image/_yds-text-with-image.scss index 0f946142e..e4fa88460 100644 --- a/components/02-molecules/text-with-image/_yds-text-with-image.scss +++ b/components/02-molecules/text-with-image/_yds-text-with-image.scss @@ -1,8 +1,10 @@ @use '../../00-tokens/tokens'; +@use '../../01-atoms/atoms'; .text-with-image { @include tokens.spacing-page-section; + // used by a element for animated hover underline --color-text-shadow: var(--color-basic-white); } @@ -89,6 +91,10 @@ .text-with-image__text { color: var(--color-text); + a { + @include atoms.link; + } + > *:last-child { margin-bottom: 0; } diff --git a/components/02-molecules/text/_yds-text-field.scss b/components/02-molecules/text/_yds-text-field.scss index 9fe558529..1023dc9e3 100644 --- a/components/02-molecules/text/_yds-text-field.scss +++ b/components/02-molecules/text/_yds-text-field.scss @@ -4,6 +4,9 @@ .text-field { @include tokens.spacing-page-inner; + // used by a element for animated hover underline + --color-text-shadow: var(--color-basic-white); + .text { overflow-x: auto; } diff --git a/components/02-molecules/wrapped-image/_yds-wrapped-image.scss b/components/02-molecules/wrapped-image/_yds-wrapped-image.scss index b08a0e2cf..eaa9e5ce2 100644 --- a/components/02-molecules/wrapped-image/_yds-wrapped-image.scss +++ b/components/02-molecules/wrapped-image/_yds-wrapped-image.scss @@ -6,6 +6,9 @@ $wrapped-image-offset-max: 1550px; .wrapped-image { @include tokens.spacing-page-inner; + // used by a element for animated hover underline + --color-text-shadow: var(--color-basic-white); + // Clear the float in case the next component is an image or something. &::after { content: ''; diff --git a/components/03-organisms/component-wrapper/_yds-component-wrapper.scss b/components/03-organisms/component-wrapper/_yds-component-wrapper.scss index 0b328a4c9..bedfc7712 100644 --- a/components/03-organisms/component-wrapper/_yds-component-wrapper.scss +++ b/components/03-organisms/component-wrapper/_yds-component-wrapper.scss @@ -6,6 +6,10 @@ &--no-top-margin { margin-top: 0; } + + &--no-bottom-margin { + margin-bottom: 0; + } } .component-wrapper__heading {