w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.35k stars 641 forks source link

[css-overflow-5] ::scroll-marker-group should use its originating element as its implicit anchor element #10494

Open tabatkins opened 1 week ago

tabatkins commented 1 week ago

An expected common behavior for ::scroll-marker-group is that it'll be abspos and attached to its scroller. This currently would require use of anchor-name on the scroller, but I think we can just set the scroller as the ::scroll-marker-group's implicit anchor element instead. This way, assuming position-anchor isn't set on ::scroll-marker-group, it'll automatically anchor itself to its scroller. You'd be able to do things like set inset-area: right center; without any additional effort, etc.

yisibl commented 1 week ago

So will this allow us to anchor any element to ::-webkit-scrollbar-thumb?