Extending the outer theme with a nested ThemeProvider throws an error if css variables are active #44429
Labels
customization: theme
Centered around the theming features
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Steps to reproduce
Steps:
createTheme
is called with the outer theme spread into it, an error is thrown. This seems to be because the outer theme has avars
field, which is not allowed as an input tocreateTheme
.Current behavior
The following error is thrown:
Expected behavior
An error should not be thrown and the outer theme should be able to be extended even if CSS variables are enabled.
Context
We're trying to extend the outer theme with additional styles, as described in the docs.
I'm happy to raise a PR to address this issue, once a fix has been agreed.
Your environment
npx @mui/envinfo
Search keywords: Extending theme
The text was updated successfully, but these errors were encountered: