What No One Told You About Z-Index (2013)
philipwalton.com
What No One Told You About Z-Index (2013)
1–10 of 27 posts
Re: What No One Told You About Z-Index (2013)
#2Another solution of to the problem is to change the background-color property, which isn't against his rules ;)
Re: What No One Told You About Z-Index (2013)
#3Good article. I've had that one bookmarked for a while, and it has saved me more than one headache. If you don't understand stacking context and z-index is not working as you expect, you need to go read this.
Re: What No One Told You About Z-Index (2013)
#4Good article. I've had that one bookmarked for a while, and it has saved me more than one headache. If you don't understand stacking context and z-index is not working as you expect, you need to go read this.
This saved my ass, and my head from exploding. I found it while dealing with an obnoxious situation where a sibling element's background was causing background-color to not work at all when positioned behind said background-color having element. And it was fascinating to read about how z-index works. One of those little-known quirks to CSS that everybody really should know.
Re: What No One Told You About Z-Index (2013)
#5Oh wow, this is great! Definitely pulled some hairs out regarding z-index more than once. What a great read.
Re: What No One Told You About Z-Index (2013)
#6In modern CSS we have even more ways to do this, specifically many values of "transform:" will also create a new context.
Re: What No One Told You About Z-Index (2013)
#7Ha ha ha what a great and simple markup language we have
Re: What No One Told You About Z-Index (2013)
#8I think the problem is not that few people reads the spec, but having picked a name that was now declarative. Something like 'context-order' would give a better hint that the stacking is not as simple as one might think.
Choosing css property names is like designing the UI of css
Re: What No One Told You About Z-Index (2013)
#9Ha ha ha what a great and simple markup language we have
Do you have a proposal for a system that properly integrates alpha and layering without the notion of a stacking context?
Re: What No One Told You About Z-Index (2013)
#10This is pretty rough, but I created a Chrome extension to help look up the closest parent stacking context: https://github.com/gwwar/z-context