W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [css3-images] min/max-width/height wording in sizing rules for object-fit: contain/cover

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 21 Mar 2012 18:21:53 -0700
Message-ID: <CAAWBYDDmfXYmaKtfw5h1obb7f2CdbrZw_nbHnvtUpb1pXTUrSw@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style@w3.org
On Wed, Mar 14, 2012 at 2:50 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Mar 14, 2012 at 2:42 PM, L. David Baron <dbaron@dbaron.org> wrote:
>> http://dev.w3.org/csswg/css3-images/#object-fit (5.4, Sizing
>> Objects: the ‘object-fit’ property) says in the definition of
>> 'contain':
>>  # Determine the used ‘height’ and ‘width’ of the element as usual,
>>  # except: If both ‘height’ and ‘width’ are ‘auto’, and the used
>>  # value of at least one of ‘max-width’ and ‘max-height’ is not
>>  # ‘none’, then compute the element's used width and used height as
>>  # though the intrinsic dimensions of the contents were infinitely
>>  # large numbers whose ratio is the actual intrinsic ratio of the
>>  # contents. This will proportionally scale the used width and
>>  # height up to the given maximum constraints.
>> and then in the definition of 'cover' it says:
>>  # Determine the used ‘height’ and ‘width’ of the element as usual,
>>  # except: If both ‘height’ and ‘width’ are ‘auto’, and the used
>>  # value of at least one of ‘min-width’ and ‘min-height’ is not
>>  # ‘none’, then compute the element's used width and used height as
>>  # though the intrinsic dimensions of the contents were infinitely
>>  # small numbers whose ratio is the actual intrinsic ratio of the
>>  # contents. This will proportionally scale the used width and
>>  # height down to the given minimum constraints.
>>
>> For a start, as far as I'm aware, min/max-width/height don't have
>> used values; they only influence the used values of width and
>> height.
>
> All properties have used values.  min/max-width/height, in particular,
> sometimes need to wait until used-value time to compute anyway, such
> as if their value is a percentage and the containing block doesn't
> have a definite size in that dimension.
>
>> More importantly, the statement under 'contain' (where it deals with
>> max-*) is incorrect, since min-* override max-*, so if an element
>> with object-fit: contain has min-* set and hits the case mentioned
>> above, the final sentence quoted above won't hold.  However, if a
>> value of max-* that's been adjusted by any larger min-* is used,
>> then I believe it will hold.
>>
>> It's also not clear to me when these statements cause the behavior
>> to change.  Perhaps the spec should explain that?
>
> Whether or not to even preserve the behavior switch implied by these
> properties is one of the issues the WG needs to decide on.  I think we
> should drop that behavior, in which case these problems are moot.

These issues have been addressed by dropping the paragraph in question
entirely.  Since you accepted this change in the telcon, I assume this
is okay with you.  ^_^

~TJ
Received on Thursday, 22 March 2012 01:22:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT