Bug 309239
| Summary: | [css-anchor-position-1] Element with display: contents doesn't establish an anchor scope when using anchor-scope | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Gunnar Bittersmann <gunnar> |
| Component: | Layout and Rendering | Assignee: | Kiet Ho <kiet.ho> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, fantasai.bugs, kiet.ho, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 291856 | ||
Gunnar Bittersmann
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/172355302>
Kiet Ho
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
Pull request: https://github.com/WebKit/WebKit/pull/61288
EWS
Committed 309946@main (89983a32335b): <https://commits.webkit.org/309946@main>
Reviewed commits have been landed. Closing PR #61288 and removing active labels.
EWS
Committed 305413.596@safari-7624-branch (7cdb93183ef0): <https://commits.webkit.org/305413.596@safari-7624-branch>
Reviewed commits have been landed. Closing PR #4854 and removing active labels.