W3C home > Mailing lists > Public > www-style@w3.org > January 2016

[css-sizing] min-content for replaced elements with an aspect ratio

From: Christian Biesinger <cbiesinger@google.com>
Date: Wed, 27 Jan 2016 12:48:29 -0500
Message-ID: <CAPTJ0XEcOgeoxGMFL0y1LkY9xGfgRaHKk3FXkhrMc1=6NfAOJA@mail.gmail.com>
To: www-style list <www-style@w3.org>
Cc: Manuel Rego Casasnovas <rego@igalia.com>
Hi there!

Looking at Flexbox testcases I was wondering what the min-content size
should be for a case like:

<img style="width: min-content; height: 100px;" size="image-60x60.gif">

Should width end up at 60px because the image is 60px wide, or should
the min-content width take the aspect ratio into account and produce
100px?

https://drafts.csswg.org/css-sizing-3/#replaced-intrinsic says:
"For replaced elements, the min-content size and max-content size are
equivalent and correspond to the appropriate dimension of the concrete
object size returned by the default sizing algorithm [CSS3-IMAGES] of
the element, calculated with an unconstrained specified size."

Note "unconstrained specified size"

So that points to the width in the example being 60px, but that does
not seem to be the understanding of Gecko, nor of the Flexbox
testcases we have.

(Blink's implementation is inconsistent with width vs height, at least
when put into Flexbox. Working on fixing this...)

Thoughts?

Thanks,
-Christian
Received on Wednesday, 27 January 2016 17:49:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:00 UTC