The CSS Anchor Positioning Module is exactly what we've been needing.

How long do you think we'll have to wait until we can use it widely?

And it's worth keeping in mind that it's quite useless without the support of the anchor-scope property, which for some reason almost no one talks about.