Skip to content

Conversation

gmta
Copy link
Collaborator

@gmta gmta commented Jul 30, 2025

This parses anchor-size(..) functions in CSS, but does not yet result in a useful Size: we need style & layout interleaving similar to container queries for this, since the resulting value depends on layout results.

Not supported yet: anchor-size() appearing inside a calc() node.

Adds 4280 WPT subtest passes in css/css-anchor-position.

@gmta gmta requested a review from AtkinsSJ as a code owner July 30, 2025 12:20
@gmta gmta force-pushed the libweb-anchor-size-parsing branch 3 times, most recently from f70ce27 to 9ae335e Compare July 30, 2025 12:38
Copy link
Member

@tcl3 tcl3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we import the improved parsing tests. http://wpt.live/css/css-anchor-position/anchor-size-parse-valid.html runs reasonably quickly on my machine when imported.

If it's too slow can we at least import css/css-anchor-position/anchor-size-parse-invalid.html to prevent future regressions.

@gmta gmta force-pushed the libweb-anchor-size-parsing branch from 9ae335e to a642527 Compare July 30, 2025 15:07
@gmta gmta requested a review from tcl3 July 30, 2025 15:08
@gmta gmta force-pushed the libweb-anchor-size-parsing branch from a642527 to 3d9f605 Compare July 30, 2025 15:08
@gmta gmta force-pushed the libweb-anchor-size-parsing branch from 3d9f605 to cfda8dc Compare July 30, 2025 16:14
@gmta gmta requested a review from tcl3 July 30, 2025 16:14
This parses `anchor-size(..)` functions in CSS, but does not yet result
in a useful `Size`: we need style & layout interleaving similar to
container queries for this, since the resulting value depends on layout
results.

Not supported yet: `anchor-size()` appearing inside a `calc()` node.

Adds 4280 WPT subtest passes in `css/css-anchor-position`.
@gmta gmta force-pushed the libweb-anchor-size-parsing branch from cfda8dc to fdd0542 Compare July 30, 2025 16:23
@tcl3 tcl3 merged commit c4f5e7b into LadybirdBrowser:master Jul 30, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants