Interactive Advertising Bureau Guidelines for z-index
From the IAB’s perspective, things are pretty straightforward. They have a whole table specifying z-index ranges for almost all types of content, not just ads.
z-index has always been a pain to manage (especially in the early days when IE didn’t understand the auto value). It also just became harder now that webkit pulls fixed positioned elements out of their current context (contrary to the specs).
To me it would have made more sense for z-index to be simpler and a higher or lower z-index wins out as required. Atomic stacking contexts often fail because you may want a graphical element of your design overlapping a number of columns yet you will still want a flyout or popup being on top of this no matter where it is and adjusting the z-index of the parent dynamically breaks this layout and indeed things like shadows on the elements/columns will be lost while the dynamic effect takes place.
To me it would have made more sense for z-index to be simpler and a higher or lower z-index wins out as required
I’m not sure that would solve the problem though because it would require to know all elements involved in the stack and to also know their position in that stack (as there’d be a single stack). data that I find difficult to gather in a multi-team environment or when dealing with third-party components. Also, since source order plays a role too, the only box we know for sure would be on top of the stack is the one with the highest z-index (upper limit) which is also last in the source code. Not sure in this case authors would have much control. I think the atomic nature at least helps in this regard. It’s far from perfect, but it allows to have some control over how different elements stack on the page, regardless of their own z-index.
As a side note, since you mentioned position:fixed and the specs - the one that bothers me is the fact that fixed works the same as absolute inside elements that are “transformed”.
Maybe we needed to have both atomic and non atomic z-index values so we could control individuals or blocks as required. For dynamic elements like flyouts a value like “on-top” would be nice so that it goes on top of everything regardless .