Skip to content

Commit

Permalink
fix(scale-link): use currentColor when inside Tooltip (a11y) (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arturo Castillo Delgado authored Aug 12, 2022
1 parent 4d45f5b commit 8f557e5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/components/src/components/link/link.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@
--line-thickness-disabled: var(--line-thickness-initial);
}

/* Quick fix for inaccessible link color when placed inside a scale-tooltip */
:host-context(scale-tooltip) {
/* initial */
--color: currentColor;
--color-line-initial: currentColor;
/* visited */
--color-visited: currentColor;
--color-line-visited: currentColor;
/* hover */
--color-hover: currentColor;
--color-line-hover: currentColor;
/* focus */
--color-focus: currentColor;
--color-line-focus: currentColor;
/* active */
--color-active: currentColor;
--color-line-active: currentColor;
}

:host {
display: inline;
margin-bottom: calc(var(--line-offset) + var(--line-thickness-initial));
Expand Down

0 comments on commit 8f557e5

Please sign in to comment.