Closed Bug 1905463 Opened 1 year ago Closed 1 year ago

Cap aspect-ratio's automatic minimum size by its maximum size

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Per https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum,

In order to avoid unintentional overflow, the automatic minimum size in the ratio-dependent axis of a box with a preferred aspect ratio that is neither a replaced element nor a scroll container is its min-content size capped by its maximum size.

We've implemented the automatic minimum size, but we don't seem to cap the size by the maximum size. Therefore, we fail https://wpt.live/css/css-sizing/aspect-ratio/block-aspect-ratio-038.html and https://wpt.live/css/css-sizing/aspect-ratio/block-aspect-ratio-039.html

The flex container and grid container have already considered max sizes clamping
when computing their sizes. Therefore, flex-aspect-ratio-043.html,
flex-aspect-ratio-044.html, and grid-aspect-ratio-042.html already pass on
the current Nightly without this patch.

  • flex-aspect-ratio-043.html and flex-aspect-ratio-044.html are adapted from
    flex-aspect-ratio-040.html and flex-aspect-ratio-041.html.
  • grid-aspect-ratio-042.html is adapted from grid-aspect-ratio-039.html.
  • fieldset-element-002.html is adapted from fieldset-element-001.html.
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Attachment #9410333 - Attachment description: Bug 1905463 - Cap aspect-ratio's automatic minimum size by its maximum size. r?#layout → Bug 1905463 - Cap aspect-ratio's automatic minimum size by the maximum size. r?#layout
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e14640934441 Cap aspect-ratio's automatic minimum size by the maximum size. r=layout-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46954 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: