The interesting thing about <dialog> is that it uses the "top layer" which always appears above everything else on the page regardless of z-index. So you can delete hacks like z-index:2147483647.
Using CSS-in-JS we at least make constants so we can do stuff like: `const STICKY_HEADER_Z = TOOLTIP_Z + 1`.
Also doesn't this mean you have to listen for scroll events this way and update the XY coordinates for things like dropdowns?
Also drop downs are "attached" to some element in the UI, and you probably want those menus to scroll with the page
Usually if I find that if I need to control more then one layer of stacking, I’m doing something that is unnecessarily complex, and the right solution is to go back and find a better design.