zIndex Theme override/make additions
See original GitHub issueI would like the ability to either add new properties to the zIndex theme object or modify the currently available keys:
mobileStepper: 1000,
appBar: 1100,
drawer: 1200,
modal: 1300,
snackbar: 1400,
tooltip: 1500
for example, I would like to add popover: 1000
but cannot find a way to add it to the theme. The last I could find online regarding this was for older versions of the library and are now obsolete on our version 4.4.2, https://stackoverflow.com/questions/35071435/set-component-z-index-on-custom-theme-in-material-ui.
If I have missed this somewhere in the documentation, please point me in the right direction. I was only able to find the bit about changing the values (not adding or modifying the keys), https://material-ui.com/customization/z-index/
Thanks very much and appreciate your work!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
mui/material-ui - zIndex Theme override/make additions - GitHub
I would like the ability to either add new properties to the zIndex theme object or modify the currently available keys: mobileStepper: 1000 ......
Read more >Understanding CSS z-index - MDN Web Docs - Mozilla
The z-index attribute lets you adjust the order of the layering of objects when rendering content. In CSS 2.1, each box has a...
Read more >How to set the zIndex on the drawer component - Stack Overflow
If you don't want to use important! you can override zIndex either by using Material-UI theme API or by inlining styles.
Read more >Customizing components - Material-UI - MUI
The first way to override the style of a component is to use class names. Every component provides a className property which is...
Read more >A user's guide to CSS variables – Increment: Frontend
Cycles make CSS variables invalid at computed value time ... z-index: var(--i); ... We could even create themes on the fly, by overriding...
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 Free
Top 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
Right, so people can then do:
or with the theme
Is it possible to set
zIndex
in overrides withincreateMuiTheme
using'!important'
? Currently trying to overrideMuiDialog
’szIndex
usingcreateMuiTheme
but failing to do so since the property does not accept strings.