Skip to content
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

Use focus-visible to hide outlines when using mouse #241

Merged
merged 2 commits into from
Jan 5, 2021
Merged

Conversation

domyen
Copy link
Member

@domyen domyen commented Dec 29, 2020

Hide :focus outlines when using a mouse and remove a bunch of :focus button styles.

@domyen domyen added the enhancement New feature or request label Dec 29, 2020
@domyen domyen requested a review from kylesuss December 29, 2020 21:11
Comment on lines -73 to -79
&:focus {
box-shadow: ${rgba(color.primary, 0.4)} 0 1px 9px 2px;
}

&:focus:hover {
box-shadow: ${rgba(color.primary, 0.2)} 0 8px 18px 0px;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like you added these styles back anywhere. Do I have that right? Was that the intent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. I removed them all because we now have a better way to detect whether something if focused via mouse and via keyboard. If it's via mouse, there's no focus UI. If it's via keyboard, we should use the system default focus UI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Cool. Makes sense.

Copy link
Contributor

@kylesuss kylesuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. Just want to validate that the space I called out is not causing any unexpected behavior.

@kylesuss
Copy link
Contributor

kylesuss commented Jan 5, 2021

Merge when ready 👍

@domyen domyen merged commit 1f60429 into master Jan 5, 2021
@domyen domyen deleted the focus-visible branch January 5, 2021 15:56
@kylesuss
Copy link
Contributor

kylesuss commented Jan 5, 2021

🚀 PR was released in v5.4.6 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants