Theme Nesting?
See original GitHub issueIs your feature request related to a problem? Please describe. I want to be able to reference other theme values from the theme itself. Sorry if this is already a feature!
Describe the solution you’d like
Ideally, the same way react-i18next
works. You can reference strings from the same file with the nesting feature.
Describe alternatives you’ve considered Hard-coding values or not putting nested styles inside, neither of which are ideal.
Additional context I want to be able to set primary colour like this.
colors: {
gray-500: '#ccc',
primary: 'gray-500',
}
This currently does not work, I have to hard-code primary value and leave a comment explaining what it is. The same applies for other keys in the theme object I believe.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Theme nesting with Material UI - reactjs - Stack Overflow
There are several different styles I need to apply to some of them. I want to create a global theme for handling everything...
Read more >Theming - Material UI - MUI
The theme specifies the color of the components, darkness of the surfaces, level of shadow, appropriate opacity of ink elements, etc. Themes let...
Read more >Nesting themes | React Material-UI Cookbook
By nesting MuiThemeProvider components, you can compose multiple themes that handle different aspects of a theme into a single theme that's suitable for...
Read more >Theme Nesting Doesn't Work (seems has something to do ...
Theme Nesting Doesn't Work (seems has something to do with storybook) #29087 ; Current Behavior ; Expected Behavior ; Steps to Reproduce.
Read more >Nested Theme Providers - Theme UI
The nested ThemeProvider component can use a functional theme to avoid deep merging the objects or to control the way the two objects...
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
Closing in favor of #1234
There is a workaround btw.
@hasparus I think we can close this in favor of #1234