2 ms·
"In 2022 we brought you z-index:10000 and a lot of web UI developers used this to create masterful new models of interactivity within the browser. But we've he
by PaulDavisThe1st 4y ago
"In 2022 we brought you z-index:10000 and a lot of web UI developers used this to create masterful new models of interactivity within the browser.
But we've heard your feedback, and today, in 2023, we bring you the "topper-layer", accessed using z-index:12000.
You might be wondering if we're going to stop here. The answer of course, is no. We have a roll-out plan for the next 8 years which will culminate in z-index:100000.
Some of you might be asking if our plans for the super-topper-most-mostest-layer are really just reducing this all back to "normal" z-index stacking in the document flow. We'll leave that as a discussion for the forums, while we get back to work."
- hoten 4y agoAt the risk of reading too much into a joke, what about the top layer / stack suggests this would later beg for a "topper layer"?
- ramesh31 4y agoYou joke, but z-index really is one of the worst decisions in the CSS spec. So. Many. Footguns. There really is almost no case in which a combination of DOM hierarchy and positioning isn't sufficient.
- threatripper 4y agoz-index YYYYMMDD
- matsemann 4y agoActually not that bad. If everyone assumed today's date to be the max value, one could always add something new on top without having to guess whatever value someone else has used, and risk exhausting the range because someone uses the max value.
- trevvr 4y agoBut what's today for me is yesterday in New Zealand and if I'm on the West Coast of the US or Hawaii then that can go on for a 'long time'? If I then go +1 then that's just going to end up in the same rat race / breakages.
- zamadatix 4y agoIf CSS would up it to be a 64 bit integer then timestamp could fix all that. That's a common approach to DNS serials, there they are 32 bit but there is logic about handling rollovers that wouldn't apply to layers. Or if you want to keep it human readable UTC.
- tomxor 4y agoIt's not half bad, the problem is that you'd have to throw an error when attempting to use higher values (or in CSS's case just not render it or something), because currently z-index will happily accept >max values and just consider them max.
- mcv 4y agoI was thinking: does this solve a problem, or does it introduce another problem?
- goto11 4y agoPopups already exist on the web. Typically they are implemented by injecting an element as the last child of the body element, and then use absolute positioning on it. Last inserted element wins. This proposal just allows the same effect with simpler code and no need for DOM injection.