When try to set z-index
of a div inside a component via style={"z-index": "-99"}
it doesn't work. In element inspector it becomes "z-index: 0px".
Is there workaround for this?
If you use zIndex
it'll work correctly (and you won't have to quote it!). That really should warn you -- we have #932 open for adding a warning.
So many other properties are supported with quotes. Why is this one any different? This is inconsistent.
Please disregard, for some reason I am finally seeing the errors for other styles which used dash. Camel case is the standard.
We've had this warning since React v0.12 in 2014 now. (One of @gaearon's first PRs!)
Most helpful comment
If you use
zIndex
it'll work correctly (and you won't have to quote it!). That really should warn you -- we have #932 open for adding a warning.