Repository navigation
fix(theme): limit the global link hover to devices that can hover - #381
Merged
alexgrozav merged 1 commit intoOct 30, 2026
Merged
Conversation
A tap on a touch screen leaves :hover applied, so a link, or a recipe rendered as <a href> like a Button, kept the global a:hover colour and underline after the tap. The hover styles of useLinkElement now sit inside @media (hover: hover). The link.hover.* variables and their defaults stay the same.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 of 13 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Applies the hover styles of
useLinkElementonly on devices that can hover. A tap on a touch screen leaves:hoverapplied, so a link, or a recipe rendered as<a href>like a primarysolidButton, kept the globala:hovercolor and underline after the tap. Thea:hoverdeclarations now sit inside@media (hover: hover), the same way the recipes limit their own hover styles.link.hover.colorandlink.hover.text-decorationvariables, their defaults and theuseLinkElementoptions don't change.useLinkElement.test.tschecks that the hover declarations sit inside@media (hover: hover)and that the variables and their defaults stay the same.<a href>button keeps the globala:hoverstyles after a tap.Related issue
Part of the integration stack that aligns component styles with Open Components.
Type of change
Checklist
feat(theme): …)pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm testand everything passespnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/testsdist/,.styleframe/)mainand stays focused in scopeNotes / screenshots
pnpm testpasses except 8@styleframe/playgroundtests intest/theme.test.ts(localStorageis undefined), which fail the same way on the base branch.a { …; @media (hover: hover) { &:hover { … } } }, and noa:hoveroutside it.main, so it gets no CI of its own.