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

_forms.scss should not style global button element #6669

Open
rodrigovallades opened this issue Aug 17, 2022 · 1 comment
Open

_forms.scss should not style global button element #6669

rodrigovallades opened this issue Aug 17, 2022 · 1 comment

Comments

@rodrigovallades
Copy link

rodrigovallades commented Aug 17, 2022

Current Behavior

sass/components/forms/_forms.scss applies a global button:focus background-color.

button:focus {
  outline: none;
  background-color: $button-background-focus;
}

This makes no sense at all. We have 3 problems here:

  1. Why is this in _forms.scss and not _buttons.scss?
  2. _button.scss already implements a :focus state
  3. This should have never been be applied to the global HTML button element. It should be scoped to Materialize, so it should be applied to the .btn class instead - otherwise it bleeds to unintended parts of the application.

Solution

Remove this implementation from _forms.scss and let _button.scss do it's thing.

Environment

Version used: 1.0.0

@rodrigovallades rodrigovallades changed the title components/forms/_forms.scss styles HTML button element fix: materialize :focus stule in HTML button element Aug 17, 2022
@rodrigovallades rodrigovallades changed the title fix: materialize :focus stule in HTML button element fix: materialize :focus style in HTML button element Aug 17, 2022
@rodrigovallades rodrigovallades changed the title fix: materialize :focus style in HTML button element fix: materialize :focus in button element Aug 17, 2022
@rodrigovallades rodrigovallades changed the title fix: materialize :focus in button element sass/components/forms/_forms.scss should not style HTML button element Aug 17, 2022
@rodrigovallades rodrigovallades changed the title sass/components/forms/_forms.scss should not style HTML button element sass/components/forms/_forms.scss should not style global button element Aug 17, 2022
@rodrigovallades rodrigovallades changed the title sass/components/forms/_forms.scss should not style global button element _forms.scss should not style global button element Aug 17, 2022
@Jerit3787
Copy link

Hi, this project is no longer maintained! The community-managed fork is still being maintained. Please open an issue there instead. Thanks! https://www.github.com/materializecss/materialize

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

2 participants