5.0.0-alpha.21 - "styled" Button/IconButton is breaking implementations from prior version #24215
Closed
2 tasks done
Labels
duplicate
This issue or pull request already exists
When upgrading to the latest build, I noticed that a lot of the button styles are broken when using styled-engine (styled) to create custom button styles.
Current Behavior 😯
After looking into the issue, I noticed that ButtonBase now includes some reset styling: eg, padding: 0, margin: 0, border: 0, etc.
Expected Behavior 🤔
It seems that switching Button (and all applicable components) over to use emotion has caused some major styling bugs for my big project. In my opinion, these properties used to "reset" the button/a element for all browsers do not belong at the component level, but should be injected via CssBaseline. Ideally, any styled (styled-engine) Button / IconButton components should work seamlessly between prior 5.0.0 versions and the current alpha release.
I believe part of this issue may be due to the change that injects some global stylings for the buttons (as mentioned in PRs). It seems to inject those global styles with precedence over any styling applied via styled from styled-engine. Maybe I'm missing something, but I am using the correct StyleProvider from styled-engine with injectFirst set to true.
Steps to Reproduce 🕹
To reproduce, simply create a styled (style-engine) Button using the previous version and the current version. You should see stark differences in padding/margin/border/etc.
Context 🔦
Your Environment 🌎
5.0.0-alpha.21
The text was updated successfully, but these errors were encountered: