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
[material-ui] Dialog Title overrides the Dialog Content padding #27851
Comments
Hi Chase, |
You codesandbox doesn't include any styles related to padding. Could you clarify what the issue is? Or are you just suggesting that the content should have padding as well? |
@eps1lon I am suggesting content should have padding as well as a default. That way it can be modified in a theme. For example: this doesn't work and gets overridden and paddingTop gets set to 0
|
I have this same issue: My Theme:
Dev tools CSS: Temporary work around is to apply style directly to dialog content component: |
Why was this closed? Has it been fixed? |
I am getting the same issue, was this closed because it was fixed? |
It was closed because it had been left as incomplete for a few months, where in fact @chaserda had provided additional information, but the incomplete status hadn't been removed. Moving back to "needs triage" |
I have numerous dialogs in my app, so I did a hacky option, which I would rather remove when this is fixed:
|
ran into this issue |
Also struggled a long time with this. Appears to me as a bug that one need to override with |
Just running into this issue now after migrating from MUI V4 to V5 |
Document work around add document.body.classList.add('fix_body_padding_open'); on top of your react hooks component css then remove it onClose document.body.classList.remove('fix_body_padding_open'); |
Can be overwritten like this as well. <DialogContent sx={{ '.MuiDialogContent-root&.MuiDialogContent-root': { pt: 1 } }}> |
I resolve this problem with this way:
Use the more higher poiority css selector to cover it in |
Same issue |
Title gets rid of the top padding on Dialog Content and it gets overridden by:
.MuiDialogTitle-root+.css-141nu3b-MuiDialogContent-root {
padding-top: 0;
}
This is on "@material-ui/core": "^5.0.0-beta.1".
This is an issue if you have the whole title background a different color than the content. Content will bump right up to it.
Example:
https://codesandbox.io/s/hopeful-fermi-0v850?file=/src/App.js:514-515
#26795
The text was updated successfully, but these errors were encountered: