aspect-ratio breaks size containment
Categories
(Core :: Layout, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: psychpsyo, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0
Steps to reproduce:
Specifying an aspect-ratio on an element with size containment (containerType: size) breaks the size containment.
I've already PRed a new web platform test for this here: https://github.com/web-platform-tests/wpt/pull/54107
Actual results:
The element now sizes to its children.
Expected results:
The element should be sized as if empty. (= it should be the specified aspect-ratio)
Comment 1•10 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•10 months ago
|
Comment 2•10 months ago
|
||
Thanks, I agree it's a bug.
Boris, ni? in case it's an easy fix :)
| Assignee | ||
Comment 3•10 months ago
|
||
I have an idea to fix this.
Also, the upstream PR https://github.com/web-platform-tests/wpt/pull/54107 will be imported in Bug 1980709.
| Assignee | ||
Comment 5•9 months ago
|
||
When the block-axis has size containment, the block-size can be determined
without considering the element's children. Therefore, aspect-ratio's automatic
content-based minimum sizes should not apply in this case.
https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum
This behavior is aligned with blink and webkit.
Comment 7•9 months ago
|
||
| bugherder | ||
Updated•9 months ago
|
Description
•