Above is the plotting of the growth of z-indices over time in a project in CSS. Earlier this week I was told that my QA team was discovering websites in our network that had z-indices of upwards of 90,000,000. Hence I have developed a hard observational rule about z-index:
The higher a extant z-index, the greater the increase in the z-index to override it.
I have no reasoning for why this rule exists, perhaps it's ego or frustration to just be on top, but take some time and observe z-index in yours and other's projects and you'll find it to be true. Around 100, people will jump between 90 and 110, once you get to 500, you're in the realms of 50 increases, and past a 1000, you'll see serious gains. Finally, someone will just say fuck it and start placing 500+ gains.
I've had the fortune of seeing good style guides, where the developers define actual layers to their application to ensure that items are properly scoped. The joys of a well designed application. Unfortunately, when dealing with CMS structures, embedded iframes and similar black box situations, "fuck it" becomes a definitive answer.
Wednesday, May 13, 2015