[css-sizing-4] Should aspect-ratio be used for abspos `top: 0; bottom: 0;`?
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: mozilla-apprentice, Assigned: boris)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
A resolution was made for csswg-drafts/#5151.
[css-sizing-4] Should aspect-ratio be used for abspos `top: 0; bottom: 0;`?
- RESOLVED: Accept proposal
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
OK. I think we should fix all the absolute postion issues when we apply aspect-ratio: https://drafts.csswg.org/css-position/#abspos-auto-size in this bug.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
First, we have to handle zero width (e.g. width:auto or width:0) case properly
for aspect-ratio. We shouldn't resolve the block size when inline size
is 0 by a finite-ratio aspect-ratio becasue it doesn't make sense.
However, this may have impact for width:auto on the absolute position
element, which may resolve the auto inline size as 0.
IMO, we shouldn't resolve the block size by zero inline-size and a
finite aspect-ratio. This may fail the condition check
(i.e. computedSize.BSize(cbwm) == NS_UNCONSTRAINEDSIZE
) in ReflowInput
when resolving the auto block size by insets.
Based on https://github.com/w3c/csswg-drafts/issues/5151,
if the block size is auto, we still can use the insets to resolve the auto
block size on absoluate position elements, so we still can use this resolved
block size to calculate the inline size through aspect-ratio.
Assignee | ||
Comment 5•4 years ago
|
||
Those if-checks and computation could be factored out as a common function.
Besied, I use the "inline" term for the current element, instead of
the containing block.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
I'd like to handle aspect-ratio in those code block, so it'd be better
to always handle unconstrained block-size on the writing mode of the current
block. Besides, we move it as a method of ReflowInput.
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a0000c0272f
https://hg.mozilla.org/mozilla-central/rev/0f9d01688ca8
https://hg.mozilla.org/mozilla-central/rev/e65987e878dc
Description
•