Button no longer inherits color from theme
See original GitHub issueAccording to the readme:
By default an MDC Button will inherit its color from the theme
:root {
--mdc-theme-primary: #3fa9f5;
}
Since 0.21.0, this is no longer happening and the buttons are all black.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:8 (4 by maintainers)
Top Results From Across the Web
android - Why doesn't theme inherit button style - Stack Overflow
I am having a problems with my Transparent style inheriting the button style from the parent style (AppTheme). The button has a different...
Read more >Bottons inheriting old theme colors | WordPress.org
I'm getting some buttons that are inheriting an old theme color with a thick dark ... some of the darker buttons are not...
Read more >inherit - CSS: Cascading Style Sheets - MDN Web Docs
The inherit CSS keyword causes the element to take the computed value of the property from its parent element. It can be applied...
Read more >Button API - Material UI - MUI
Rule name Global class Description
root.MuiButton‑root Styles applied to the root element.
fullWidth.MuiButton‑fullWidth Styles applied to the root element if fullWidth= .
endIcon.MuiButton‑endIcon Styles applied to...
Read more >Styles and Themes - Android Developers
For example, one style might specify a button's attributes. ... since the styles are using the semantic names and not specific color definitions....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, @hebbet thanks for the useful comment!
As I said, I came here just after having read the documentation which is (sadly) not mentioning this. As a general rule, I think that it should be a good approach to update docs when something showed up in the very first tutorial is removed or modified…
I also found terribly annoying that the example linked in the theming section docs/theming/ which is pointing to the plunker https://plnkr.co/edit/qxt7qpPsXgkt9UbMnE36?p=preview, contains the old (I guess old since I just approached the repository)
mdl-
classes.Anyway, we don’t have now the possibility to use CSS Custom Properties? Just SASS?
I’ve run into this as well after updating to version 0.21.1. I think the main issue is that the documentation doesn’t reflect the current behavior of the library. As stated above (quotation from the current documentation),
Unfortunately, this is not the case and buttons are rendered with a black background no matter what the theme is set to. This is the case on the button demo page as well. It is not a problem to style the button background (or any other component) on a project-by-project basis. However, the documentation should be clear about that. Otherwise, there is something missing from the CSS that is preventing the button background from being styled correctly.