Bug 295006

Summary: [css-anchor-position-1] Anchored box detaches from anchor when scrolled partially out of view
Product: WebKit Reporter: fantasai <fantasai.bugs>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, fantasai.bugs, kiet.ho, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 289743, 291856    

fantasai
Reported 2025-06-25 19:23:33 PDT
Overview: If the anchor for an anchored box is partially scrolled out of view in the same axis as the attachment, the anchored box visually detaches from it because it is attached to the theoretical edge of the box rather than the visible edge of the box. This looks weird. You can see the effect in this testcase (though the testcase isn't testing for it): http://wpt.live/css/css-anchor-position/anchor-scroll-position-try-001.html Missing Tests: * Need a test for this behavior. Specification Notes: * The spec should clarify what's expected to happen here, which afaict is that `overflow` should effectively clamp the anchor rectangle.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-06-25 19:24:09 PDT
Note You need to log in before you can comment on or make changes to this bug.