materialize icon indicating copy to clipboard operation
materialize copied to clipboard

_forms.scss should not style global button element

Open rodrigovallades opened this issue 2 years ago • 1 comments

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 avatar Aug 17 '22 15:08 rodrigovallades

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

Jerit3787 avatar Nov 03 '22 10:11 Jerit3787