Skip to content

Commit

Permalink
fix: issue with transition for foreground color (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget authored Sep 13, 2023
1 parent abd55ef commit c81d179
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/components/src/components/link/link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
}

.db-link {
@extend %default-fg-transition;
@extend %db-link-height;
inline-size: fit-content;
align-items: center;
Expand Down
4 changes: 2 additions & 2 deletions packages/foundations/scss/db-ui-foundations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

[class^="db-"],
[class^="db-"] * {
@extend %default-color-transition;
@extend %default-transition;

::before,
::after {
@extend %default-color-transition;
@extend %default-transition;
}
}
13 changes: 11 additions & 2 deletions packages/foundations/scss/helpers/_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,24 @@ $default-mobile-header-height: functions.to-rem(56);
border-radius: $default-border-radius;
}

%default-color-transition {
%default-transition {
transition:
outline
var(
--db-transition-duration-ultra-fast,
#{var-todo.$db-transition-duration-ultra-fast}
),
background-color
var(--db-transition-color, #{var-todo.$db-transition-color}),
var(--db-transition-color, #{var-todo.$db-transition-color});
}

%default-fg-transition {
transition:
outline
var(
--db-transition-duration-ultra-fast,
#{var-todo.$db-transition-duration-ultra-fast}
),
color var(--db-transition-color, #{var-todo.$db-transition-color});
}

Expand Down

0 comments on commit c81d179

Please sign in to comment.