trying to get tooltips and dropdowns to stay attached to their parent elements used to be such a headache. i spent way too much time fighting with absolute positioning and z-index layers in the past. turns out we dont have to do that anymore because
anchor positioning is officially here as a native css feature. it makes attaching one element to another feel incredibly natural and smooth. i just went through some documentation on how to use it for nested menus and it is actually spoilerlife changing for layout stabilityspoiler]. the way you can now define an anchor target and then reference its coordinates in your styles is
]position-anchor: --my-element;
basically. it feels like a massive win for web developers who are tired of brittle ui components. i am still figuring out the edge cases for extremely complex layouts though. has anyone tried using this with italicdynamic viewport units/italic yet? it would be interesting to see if anything breaks when the keyboard pops up on mobile.
found this here:
https://www.joshwcomeau.com/css/anchor-positioning/