Skip to content

fix(ui): linkButton focus state #93683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2025

Conversation

TkDodo
Copy link
Contributor

@TkDodo TkDodo commented Jun 17, 2025

the real issue are these global styles for all a tags:

a {
color: ${theme.linkColor};
&:focus-visible,
&:hover {
color: ${theme.linkHoverColor};
}
}

However, removing them (even just for chonk) has a negative impact in many places. What we would likely need is an isolated <Link> component that sets all its styles rather than relying on global styles to affect it.

So this is more of a band-aid fix, as I’m just setting the same color while focusing, which overwrites the global one.

@TkDodo TkDodo marked this pull request as ready for review June 17, 2025 07:13
@TkDodo TkDodo requested a review from a team as a code owner June 17, 2025 07:13
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 17, 2025
@TkDodo TkDodo merged commit 5c9428c into master Jun 17, 2025
46 checks passed
@TkDodo TkDodo deleted the tkdodo/fix/de-151-linkbutton-focus-state-issue branch June 17, 2025 13:35
billyvg pushed a commit that referenced this pull request Jun 18, 2025
the real issue are these global styles for all `a` tags:


https://github.com/getsentry/sentry/blob/3c99300d6c73ff31a6f1866000fb9dcb6e56f3b0/static/app/styles/global.tsx#L145-L151

However, removing them (even just for `chonk`) has a negative impact in
many places. What we would likely need is an isolated `<Link>` component
that sets all its styles rather than relying on global styles to affect
it.

So this is more of a band-aid fix, as I’m just setting the same color
while focusing, which overwrites the global one.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
the real issue are these global styles for all `a` tags:


https://github.com/getsentry/sentry/blob/3c99300d6c73ff31a6f1866000fb9dcb6e56f3b0/static/app/styles/global.tsx#L145-L151

However, removing them (even just for `chonk`) has a negative impact in
many places. What we would likely need is an isolated `<Link>` component
that sets all its styles rather than relying on global styles to affect
it.

So this is more of a band-aid fix, as I’m just setting the same color
while focusing, which overwrites the global one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants