You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On one side, I found an ability to wrap some stuff into an element with position: relative and this isolate all the anchors inside to be a useful one, on the other — I found this to be very limiting.
I'm not sure if something like that is planned/already considered in the specs, but what I would love is to be able to change that positioned context separately from the anchor-name. Maybe using a container-name or something similar?
Basically, I would want to be able to tell an element “regardless of where you're placed in the tree, I want you to emerge upward up to a certain container, and only then look up for your anchor-names.” This would allow using global popovers, without a fear of them being constrained by some random position: relative that a parent could get.
This is very similar to the position: sticky problem, which often is limited by its context, or even position: fixed that often can get blocked by its stacking context having something like a transform applied. So it would be really nice for an absolutely positioned element to be able to “escape” its stacking/positioning context.
When I was initially thinking of anchor positioning, this was one of the first things I always wanted to be able to do in CSS — ability to skip some of the parents with position: relative or choose one of the parents explicitly as the context for my element, rather than relying on the implicitly defined contexts.