Open romakh-i opened 1 year ago
This is how emotion combines the classes, depending on whether the extractCriticalToChunks is used (for SSR). I propose opening an issue on emotion's repository if you have any doubts/questions about this.
Similar report in #33126.
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/brave-rosalind-skg4gj?file=%2Fpages%2Findex.js
I slightly changed the original example with next.js, by adding
<Button color="success" sx={{ padding: "2px" }}>
.Steps:
Current behavior 😯
Styles are duplicated (
border-radius
,color
, 3 timespadding
).Expected behavior 🤔
Styles should be combined with no duplicates. I created the same example using material-cra. Running it in production mode results in clean not duplicated css.
Context 🔦
This bugs produce duplicate styles which increases resulted css size to be downloaded on client.
Your environment 🌎
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo