RESOLVED FIXED295503
[css-anchor-position-1] Support safe and unsafe with anchor-center
https://bugs.webkit.org/show_bug.cgi?id=295503
Summary [css-anchor-position-1] Support safe and unsafe with anchor-center
Pawel Lampe
Reported 2025-07-07 00:21:35 PDT
See https://drafts.csswg.org/css-anchor-position-1/#anchor-center: > Note: 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. See CSS Box Alignment 3 § 4.4 Overflow Alignment: the safe and unsafe keywords and scroll safety limits for more details. The idea would be: In WPT: 1. implement the WPT tests as per instructions here: https://github.com/web-platform-tests/wpt/issues/49415 2. validate the new tests pass with chromium (also cross-check with spec if chromium does things correct) 3. open PR 4. get a review - perhaps from @fantasai 5. pass the review 6. land the PR In WebKit (may be done in parallel once the tests are ready to use at least locally): 1. confirm the new tests are failing 2. based on spec and on the logic to compute anchor-center (added within https://github.com/WebKit/WebKit/pull/36705/files#diff-929437bb7a5fcec3389fe764aaff2c8417194349c04719b01e9ed7a65f263eca) add support for safe/unsafe by adding proper conditions enforcing certain alignment 3. once the WPT tests landed, re-import WPT tests to WebKit source tree as a separate PR 4. open PR with implementation and test expectations modified to expect passes instead of failures on the new WPT tests added for safe/unsafe 5. ask someone involved into anchoring work for review - e.g. @nt1m, @anttijk 6. pass review 7. land the PR
Attachments
Alexsander Borges Damaceno
Comment 1 2025-07-13 22:12:29 PDT
Radar WebKit Bug Importer
Comment 2 2025-07-14 00:22:12 PDT
Alexsander Borges Damaceno
Comment 3 2025-10-03 13:07:27 PDT
EWS
Comment 4 2025-10-09 23:29:23 PDT
Committed 301301@main (dd8920b30dbe): <https://commits.webkit.org/301301@main> Reviewed commits have been landed. Closing PR #47967 and removing active labels.
Tim Nguyen (:ntim)
Comment 5 2025-10-11 10:45:45 PDT
Note You need to log in before you can comment on or make changes to this bug.