Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #289

Merged
merged 8 commits into from
Sep 10, 2023
4 changes: 4 additions & 0 deletions components/01-atoms/controls/cta/_yds-cta.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
9 changes: 9 additions & 0 deletions components/01-atoms/controls/text-link/_yds-text-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
5 changes: 5 additions & 0 deletions components/01-atoms/controls/text-link/yds-text-link.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}

Expand Down Expand Up @@ -89,6 +91,10 @@
.text-with-image__text {
color: var(--color-text);

a {
@include atoms.link;
}

> *:last-child {
margin-bottom: 0;
}
Expand Down
3 changes: 3 additions & 0 deletions components/02-molecules/text/_yds-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions components/02-molecules/wrapped-image/_yds-wrapped-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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: '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
&--no-top-margin {
margin-top: 0;
}

&--no-bottom-margin {
margin-bottom: 0;
}
}

.component-wrapper__heading {
Expand Down
Loading