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

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