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

Re: [css-sizing] Intrinsic sizing on parent, extrinsic sizing on child

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 12 Jan 2015 14:49:19 -0800
Message-ID: <CAAWBYDCm2oqCXRg8G4GFTtU4N1JR=2Zpy4FLPr3pUJh2UGwTsA@mail.gmail.com>
To: Greg Whitworth <gwhit@microsoft.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Sun, Jan 11, 2015 at 4:02 PM, Greg Whitworth <gwhit@microsoft.com> wrote:
>> I think the Chrome behavior is *better*, in that it seems to match intent well.
>> But I don't think it follows from the current definitions in Sizing, which is
>> almost certainly a Sizing bug; we've been pretty sure for a while that our
>> handling of intrinsic sizes of replaced elements is wrong.  We also simply
>> dont' define what the min-content size contribution is of a replaced element,
>> so the current spec's answer to the question is mu.
>
> I actually think that Chrome is more spec compliant here (unless I'm missing something), as this is indeed the most narrow this content could be since the word "programmer" is the longest word (which would cause the overflow).

Can you point to what part of specs you think support that?  As far as
I can tell, this situation is currently undefined in Sizing, since we
don't define what the min content contribution is for replaced
elements.

> With that said, I'm not entirely sure this is the "best" end result. For example, if you remove the text completely Chrome doesn't show the image at all (http://jsfiddle.net/2hrLf81m/) which is not what you would want. I prefer what Gecko is doing in the example provided. Although, I'm not too passionate one way or the other. I guess the big question is, what should "content" represent and what is it's min? We seem to have interop on the longest word determining the max (http://jsfiddle.net/2hrLf81m/1/) when nothing else is included so does anyone have issues with adding:
>
> "If there is content that has an intrinsic size that has a larger max width than the current max of the longest word, make this the max."

This falls out of the definition of the min-content keyword and
min-content contribution concept, if we define the min-content
contribution of an image to be its intrinsic size.  But that's what
I'm not sure we want to do.

~TJ
Received on Monday, 12 January 2015 22:50:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:50 UTC