Closed Bug 1900232 Opened 5 months ago Closed 1 month ago

Implement parsing of CSS 'anchor-size()' function in the sizing properties

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: jwatt, Assigned: dshin)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [anchorpositioning:m1])

Attachments

(6 files)

https://drafts.csswg.org/css-anchor-position-1/#anchor-size-fn

('top', 'left', 'bottom', 'right', 'inset-block-start', 'inset-block-end', 'inset-inline-start', 'inset-inline-end', 'inset-block', 'inset-inline', and 'inset')

Blocks: 1900234
Blocks: 1909332
No longer blocks: 1909332
Blocks: 1909331
Severity: -- → S3
Assignee: nobody → dshin

... Instead of handling anchor() function at each site manually.

Depends on D222530

  1. WPT tests now accept anchor-size() property for sizing, inset, and
    margin properties [1].
  2. Adjust test expectations for anchor-size() fallbacks containing
    anchor-size() - This will need to be followed up once [2] is resolved.
  3. Adjust expectations for devtools' auto-completion related mochitests.

[1] https://github.com/w3c/csswg-drafts/issues/9827
[2] https://github.com/w3c/csswg-drafts/issues/10831

Still Failing WPT tests

Depends on D222534

Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f61878e99adb Part 1 - Add `GenericAnchorSize()` for `anchor-size()`. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/8b5b3715c147 Part 2 - Create one place to shim inset getters. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/b570acf3a29f Part 3 - Add `anchor-size()` to inset properties. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/d0e997cc4143 Part 4 - Add `anchor-size()` to margin properties. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/ba6ed0972153 Part 5 - Add `anchor-size()` to sizing properties. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/a0bc0fe119dd Part 6 - Adjust test expectations for `anchor-size`. r=firefox-style-system-reviewers,devtools-reviewers,nchevobbe,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48307 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot

This increased the number of static constructors by 1 .. but not sure if that metric is currently being tracked.

Hm - TIL that metric exists.

I did add 3 static consts, but they're simple enough that it shouldn't significantly add to static init duration?

Whiteboard: [anchorpositioning:m1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: