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

Global "*:focus" styles can't be turned off #964

Open
ccondry opened this issue Jun 23, 2021 · 0 comments
Open

Global "*:focus" styles can't be turned off #964

ccondry opened this issue Jun 23, 2021 · 0 comments

Comments

@ccondry
Copy link
Contributor

ccondry commented Jun 23, 2021

Issue Type

Bug Report

Component or Pattern Affected

All components that can have :focus attribute in the browser

Expected Behavior

I expect to not have every div and tab in my page to have a primary color box shadow when the user clicks on it

Current Behavior

Many elements in my page have a primary color box shadow when clicked, even when they are not really selectable parts of the page.

Possible Solution

Don't use *:focus or any * CSS or SCSS settings without other qualifiers. These even affect items outside of the body element with the md class.

Context

*:focus should not be used, as it cannot be overridden or changed. Once this is imported from the momentum-ui core library into a web project, the *:focus styles from momentum-ui affect all elements that can be focused. Since stylesheets cascade, there is no current way to change this in my site's style except to override specific elements.

Your Environment

  • Library: @momentum-ui/core, @momentum-ui/utils
  • Version used: 19.7.2
  • Browser Name and version: Safari 14.1.1
  • Operating System and version: Mac OS 11.4
  • Link to your project: it's internal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant