Dogfalo / materialize

Materialize, a CSS Framework based on Material Design

Home Page:https://materializecss.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_forms.scss should not style global button element

rodrigovallades opened this issue · 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

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