An open source design system that's fully customizable and agent ready
TypeScript
fix(core): give Link a hover tint via color-mix (#2852) (#3182)
Durvesh Pilankarff01f6d121da
diff --git a/.changeset/link-hover-tint.md b/.changeset/link-hover-tint.mdnew file mode 100644index 0000000000..f19dfae75e--- /dev/null+++ b/.changeset/link-hover-tint.md@@ -0,0 +1,6 @@+---+'@astryxdesign/core': patch+---++[fix] Link: hovering now shifts the link color via the hover tint (`color-mix` with `--color-tint-hover`, matching Slider/Switch/RadioList). This gives always-underlined links (`hasUnderline`) a visible hover affordance they previously lacked — their underline never changed on hover — without altering the default link's underline-on-hover behavior (#2852)+@durvesh1992diff --git a/packages/core/src/Link/Link.tsx b/packages/core/src/Link/Link.tsxindex 7966d07d9f..ef576e18c5 100644--- a/packages/core/src/Link/Link.tsx+++ b/packages/core/src/Link/Link.tsx@@ -106,10 +106,20 @@ const styles = stylex.create({*/const linkColorStyles = stylex.create({primary: {- color: colorVars['--color-text-primary'],+ color: {+ default: colorVars['--color-text-primary'],+ ':hover': {+ '@media (hover: hover)': `color-mix(in srgb, ${colorVars['--color-text-primary']}, ${colorVars['--color-tint-hover']} 15%)`,+ },+ },},secondary: {- color: colorVars['--color-text-secondary'],+ color: {+ default: colorVars['--color-text-secondary'],+ ':hover': {+ '@media (hover: hover)': `color-mix(in srgb, ${colorVars['--color-text-secondary']}, ${colorVars['--color-tint-hover']} 15%)`,+ },+ },},disabled: {color: colorVars['--color-text-disabled'],@@ -118,7 +128,12 @@ const linkColorStyles = stylex.create({color: colorVars['--color-text-secondary'],},accent: {- color: colorVars['--color-text-accent'],+ color: {+ default: colorVars['--color-text-accent'],+ ':hover': {+ '@media (hover: hover)': `color-mix(in srgb, ${colorVars['--color-text-accent']}, ${colorVars['--color-tint-hover']} 15%)`,+ },+ },},inherit: {color: 'inherit',