You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we're using MUI and adopting their newly CSS variables. Before using this API, the theme object would contain the actual numeric values which then we could do something like zIndex: theme.zIndex.drawer + 1.
Since now the new theme.vars gives us something like var(--mui-zIndex-drawer) our idea was to use the following which is valid CSS calc(${theme.vars.zIndex.drawer} + 1) but the StylesOptions forces us to pass numeric values.
The text was updated successfully, but these errors were encountered:
Did you try to set the zIndex as a string and ts-ignore the error? Does it work?
The problem with accepting plain strings is that users can set 1000px and break it.
A template string would be acceptable, and I can still validate it in the code.
🐛 Bug Report
Not necessarily a bug but would like to propose that the
zIndex
prop under the StylesOptions takes in a string as well.In our project we're using MUI and adopting their newly CSS variables. Before using this API, the theme object would contain the actual numeric values which then we could do something like
zIndex: theme.zIndex.drawer + 1
.Since now the new
theme.vars
gives us something likevar(--mui-zIndex-drawer)
our idea was to use the following which is valid CSScalc(${theme.vars.zIndex.drawer} + 1)
but theStylesOptions
forces us to pass numeric values.The text was updated successfully, but these errors were encountered: