News for hackers. Stuff that matters.
Re:The top layer: a solution to z-index:10000 by fleddr on Thursday August 25, 2022 @09:51PM (#32602441)
Yes, set position:relative on a parent element, then set position:absolute with a z-index on the child element. The z-index will be relative to the parent, not to the document.
Re:The top layer: a solution to z-index:10000 by robocat on Friday August 26, 2022 @09:33AM (#32607299)
One of the wonders of CSS (well, browsers) is that you can devote a decade to learning all the various details, and still not know something so fundamental. Thank you. I don’t want to believe I could miss that, but I have been humbled enough times to be doubtful about my beliefs.
Re:The top layer: a solution to z-index:10000 by myfonj on Friday August 26, 2022 @10:32AM (#32608033)
"Stacking context" creation is one of those concepts that many coders skip while learning as "intuitive enough not to dive deeper", and then stare in disbelief on list of properties that affects this, as pointed out in https://news.ycombinator.com/item?id=32600047 .

Who would have thought that `will-change: mask-image` would have similar effect similar to `position: relative`?

Re:The top layer: a solution to z-index:10000 by marcosdumay on Friday August 26, 2022 @12:17PM (#32609345)
Somebody posted the documentation of stack isolation in another thread.

If you want exactly that, and only that, my conclusion is that the best way is to use `isolation: isolate`.