WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
294575
[css-anchor-position-1] anchor-center doesn't shift to fit in original containing block
https://bugs.webkit.org/show_bug.cgi?id=294575
Summary
[css-anchor-position-1] anchor-center doesn't shift to fit in original contai...
Kiet Ho
Reported
2025-06-16 13:47:11 PDT
The spec has this to say about anchor-center (
https://drafts.csswg.org/css-anchor-position-1/#anchor-center
):
> When using anchor-center, by default if the anchor is too close to the edge of the box’s original containing block, it will “shift” from being purely centered, in order to remain within the original containing block.
It appears WebKit doesn't implement this behavior. Steps to reproduce: * Open this demo:
https://codepen.io/yisi/details/yLrjKEO
* Check the "anchor-center" checkbox * Move the infobox to leftmost and right most position. Observe that in Chrome, the infobox shifts to the right when it's close to the left edge, and shifts to the left when it's close to the right edge. WebKit doesn't do this.
Attachments
Screenshot at leftmost position
(294.55 KB, image/png)
2025-06-16 13:59 PDT
,
Kiet Ho
no flags
Details
Screenshot at rightmost position
(321.15 KB, image/png)
2025-06-16 13:59 PDT
,
Kiet Ho
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Kiet Ho
Comment 1
2025-06-16 13:59:20 PDT
Created
attachment 475583
[details]
Screenshot at leftmost position WebKit
296286@main
Chrome Dev 139.0.7232.3 (Official Build) dev (arm64)
Kiet Ho
Comment 2
2025-06-16 13:59:54 PDT
Created
attachment 475584
[details]
Screenshot at rightmost position WebKit
296286@main
Chrome Dev 139.0.7232.3 (Official Build) dev (arm64)
Radar WebKit Bug Importer
Comment 3
2025-06-16 14:00:19 PDT
<
rdar://problem/153569520
>
fantasai
Comment 4
2025-07-09 21:44:19 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/47801
EWS
Comment 5
2025-07-10 16:14:00 PDT
Committed
297226@main
(b190a72e793d): <
https://commits.webkit.org/297226@main
> Reviewed commits have been landed. Closing PR #47801 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug