-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(button): Remove primary and accent modifier (#1270)
BREAKING CHANGE: Remove support of `mdc-button--primary` and `mdc-button--accent` modifier classes. For custom and theme button implementation, use button mixins instead. See `demos.scss` for details.
- Loading branch information
1 parent
08b5a32
commit 3e3c869
Showing
2 changed files
with
33 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3e3c869
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I'm a little late to chime in on this one, just offering an opinion.
I love the simplicity of using the library, and the ability to override things with plain CSS. Since primary and accent buttons are part of the Material Design and heavily used in lots of applications, I don't understand the reason for removing this.
The changelog says the solution is to now use the SASS mixin, but thats only helpful if my company is using SASS (which we're not). Would love to see this change reverted in the name of keeping the SASS portion of this library optional. Just by looking at the code that was removed, it's not hard to reason that replicating a properly colored button without the SASS mixin would be very difficult.
-- Side note, I've wrapped the whole thing in React so I'm reasonably well versed with the lib at this point :) https://github.com/jamesmfriedman/rmwc
Thanks!
James
3e3c869
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesmfriedman instead you can use this class now ->
className="mdc-theme--secondary-bg"
3e3c869
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @j-o-d-o. Yeah I figured that was the direction you guys were leaning towards internally and had updated my docs already to support it. A little more verbose, but highly composable in the long run. Thanks for the reply!
https://jamesmfriedman.github.io/rmwc/buttons