[theme/styles] Unable to override MuiTableCell padding
See original GitHub issuedemo: https://codesandbox.io/s/vyj481zp05
versions: see demo
I’m doing
const theme = createMuiTheme({
overrides: {
MuiTableCell: {
root: {
padding: '40px 24px 40px 16px',
backgroundColor: 'lightblue'
}
}
}
});
but it’s injected before other MuiTableCell styles, so it doesn’t override
.MuiTableCell-root-37 {
padding: 40px 24px 40px 16px;
text-align: left;
border-bottom: 1px solid
rgba(235, 235, 235, 1);
background-color: lightblue;
}
//...
.MuiTableCell-paddingDefault-40 {
padding: 4px 56px 4px 24px;
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
[theme/styles] Unable to override MuiTableCell padding #9749
For anyone that ends up here trying to override the default padding of a TableCell : It looks like the CSS class paddingDefault...
Read more >Issues overriding material UI styles - Stack Overflow
Issues with overriding this particular padding. I tried to use .MuiTableCell-root but it also didn't update the padding.
Read more >Material UI Override table padding on last child - CodeSandbox
Material UI Override table padding on last child ... Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Shared tabs - OneTab
[theme/styles] Unable to override MuiTableCell padding · Issue #9749 · mui-org/material-ui · Zip アジアンヌードル - Google 検索.
Read more >Struggling to override some of the default styling in Material UI ...
I'm currently trying to change the padding on an MUI Button component but ... theme files, global overrides etc and I can't spot...
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
@caub Plase ask how-to questions in Stack Overflow or gitter, and keep Github Issues for bugs or feature discussions.
If you would like to link from here to your question on SO, I’ll follow up there.
For anyone that ends up here trying to override the default padding of a
TableCell
:It looks like the CSS class
paddingDefault
was removed, so you now need to override the padding in theroot
class ofMuiTableCell
as @caub does at the top of this issue.