Skip to content

Commit

Permalink
fix: set correct visited link tokens for link and toggletip (#15790)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph committed Mar 11, 2024
1 parent 19d690d commit 2e53484
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/styles/scss/components/link/_link.scss
Expand Up @@ -19,6 +19,10 @@ $link-hover-text-color: custom-property.get-var(
'link-hover-text-color',
$link-primary-hover
);
$link-visited-text-color: custom-property.get-var(
'link-visited-text-color',
$link-visited
);
$link-focus-text-color: custom-property.get-var(
'link-focus-text-color',
$focus
Expand Down Expand Up @@ -48,7 +52,7 @@ $link-focus-text-color: custom-property.get-var(
&:active:visited:hover {
@include focus-outline;

color: $text-primary;
color: $link-text-color;
outline-color: $link-focus-text-color;
text-decoration: underline;
}
Expand All @@ -61,11 +65,11 @@ $link-focus-text-color: custom-property.get-var(
}

&:visited {
color: $link-primary;
color: $link-visited-text-color;
}

&:visited:hover {
color: $link-primary-hover;
color: $link-visited-text-color;
}
}

Expand All @@ -81,11 +85,11 @@ $link-focus-text-color: custom-property.get-var(
}

.#{$prefix}--link.#{$prefix}--link--visited:visited {
color: $link-visited;
color: $link-visited-text-color;
}

.#{$prefix}--link.#{$prefix}--link--visited:visited:hover {
color: $link-primary-hover;
color: $link-hover-text-color;
}

.#{$prefix}--link.#{$prefix}--link--inline {
Expand Down
4 changes: 4 additions & 0 deletions packages/styles/scss/components/toggletip/_toggletip.scss
Expand Up @@ -63,6 +63,10 @@
'link-hover-text-color',
theme.$link-inverse
);
@include custom-property.declaration(
'link-visited-text-color',
theme.$link-inverse
);
@include custom-property.declaration(
'link-focus-text-color',
theme.$focus-inverse
Expand Down

0 comments on commit 2e53484

Please sign in to comment.