w3c / csswg-drafts

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

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

Open tabatkins opened 4 months ago

tabatkins commented 4 months 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 4 months ago

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