RESOLVED FIXED309239
[css-anchor-position-1] Element with display: contents doesn't establish an anchor scope when using anchor-scope
https://bugs.webkit.org/show_bug.cgi?id=309239
Summary [css-anchor-position-1] Element with display: contents doesn't establish an a...
Gunnar Bittersmann
Reported 2026-03-05 00:36:42 PST
Hi, this grid layout works fine in Firefox ans Chromium browsers: https://codepen.io/gunnarbittersmann/pen/OPRyObK The headings should be positioned above the first item of their section. In Safari (26.3 on macOS and iOS), all headings are stacked onto each other at the position of the last section heading, as it would look like in other browser without `anchor-scope` being set. May it be that `anchor-scope` doesn’t work well with `display: contents` on the same element?
Attachments
Radar WebKit Bug Importer
Comment 1 2026-03-12 01:37:11 PDT
Kiet Ho
Comment 2 2026-03-24 16:06:27 PDT
Hello, thank you for your report. We do have a bug where a display: contents element would not establish an anchor scope, even if anchor-scope is set. A patch is forthcoming.
Kiet Ho
Comment 3 2026-03-24 17:02:03 PDT
EWS
Comment 4 2026-03-25 15:23:00 PDT
Committed 309946@main (89983a32335b): <https://commits.webkit.org/309946@main> Reviewed commits have been landed. Closing PR #61288 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.