Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Box Component): Box clone not overriding child component styles #16594

Closed
wants to merge 1 commit into from

Conversation

zetsin
Copy link

@zetsin zetsin commented Jul 13, 2019

Fix Box clone not overriding child component styles #15993 , by setting higher index(default 0) to insert Box style after.

ref https://cssinjs.org/jss-api/?v=v10.0.0-alpha.22#create-style-sheet


@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 13, 2019

@zetsin Thanks for taking the time to look into the problem. The long term plan is to remove the clone prop thanks to #15561. If you have a style conflict, you probably don't want to use the Box for that specific case.

@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: 783b693...504260c

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% +0.01% 🔺 327,763 327,771 90,314 90,319
@material-ui/core/Paper 0.00% 0.00% 68,477 68,477 20,407 20,407
@material-ui/core/Paper.esm 0.00% 0.00% 61,761 61,761 19,190 19,190
@material-ui/core/Popper 0.00% 0.00% 28,942 28,942 10,407 10,407
@material-ui/core/Textarea 0.00% 0.00% 5,505 5,505 2,365 2,365
@material-ui/core/TrapFocus 0.00% 0.00% 3,753 3,753 1,576 1,576
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,160 16,160 5,813 5,813
@material-ui/core/useMediaQuery 0.00% 0.00% 2,595 2,595 1,104 1,104
@material-ui/lab 0.00% 0.00% 138,027 138,027 42,562 42,562
@material-ui/styles 0.00% 0.00% 51,887 51,887 15,384 15,384
@material-ui/system 0.00% 0.00% 15,576 15,576 4,432 4,432
Button 0.00% 0.00% 81,161 81,161 24,779 24,779
Modal 0.00% 0.00% 14,551 14,551 5,102 5,102
Portal 0.00% 0.00% 3,471 3,471 1,573 1,573
Slider 0.00% 0.00% 75,100 75,100 23,309 23,309
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing 0.00% 0.00% 54,338 54,338 13,762 13,762
docs.main 0.00% 0.00% 647,863 647,863 204,220 204,220
packages/material-ui/build/umd/material-ui.production.min.js 0.00% +0.01% 🔺 300,178 300,186 86,044 86,050

Generated by 🚫 dangerJS against 504260c

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 13, 2019

I'm closing. This change breaks the code of people providing a class name to the Box component. The specificity will be wrong. I would discourage abusing the clone prop instead.

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants