question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[theme/styles] Unable to override MuiTableCell padding

See original GitHub issue

demo: 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:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

36reactions
mbrookescommented, Jan 5, 2018

@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.

18reactions
golearycommented, Dec 19, 2019

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 the root class of MuiTableCell as @caub does at the top of this issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found