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

Re: [css3-images] Editorial: Wording of 'object-fit: fill' apparently mandates filling the content box

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 2 Feb 2012 04:33:47 -0800
Message-ID: <CAAWBYDA2PBEON2wj-EiEKXLaPZzXEs=21d=eKoL34ThoiRHxKA@mail.gmail.com>
To: Leif Arne Storset <lstorset@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Wed, Feb 1, 2012 at 7:19 AM, Leif Arne Storset <lstorset@opera.com> wrote:
> Leif Arne Storset <lstorset@opera.com> skreiv Wed, 01 Feb 2012 15:34:06
> +0100
>> In section 5.4, the definition for 'object-fit: fill' currently contains:
>>
>> # Set the object's size to the concrete object size obtained by running
>> # the object sizing algorithm with a specified size and a default object
>> # size equal to the replaced element's used width and height.
>> #
>> - This will make the contents exactly fill the replaced element's
>> - content box.
>>
>> This statement will probably be interpreted too strongly. For example, an
>> SVG image with preserveAspectRatio not set to "none" will be given the
>> entire content box of the replaced element to render in, but it will
>> actually only render into an area that will maintain the aspect ratio. [0]
>>
>> Of course, if the reader consults section 5.2. "CSS⇋Object Negotiation",
>> step 3, the correct behavior is specified there. However, I think it's
>> good to be clearer about the behavior here.
>>
>> Note that Opera's implementation (AFAIK the only of the two that is easily
>> obtainable) does not currently match the spec in this respect. (Or rather,
>> it matches the overly-strict interpretation of the paragraph quoted
>> above.)
>>
>> Suggested wording:
>>
>> # Set the object's size
>> [...snip rest of paragraph...]
>> #
>> + This will allow the object to fill the replaced element's content box.
>> +
>> + NOTE: However, the object may choose to render at a smaller size, as
>> +       mentioned in section 5.2. For example, an SVG image will usually
>> +       preserve its aspect ratio even if 'fill' is specified.
>
>
> Suddenly I see that there's a note to this effect at the end of section 5.4.
> My suggested note can probably be dropped, though I maintain my suggested
> rewording.

Your rewording seems acceptable.  Fixed.  (As our preprocessor is down
right now, you won't see it in the public ED.)

~TJ
Received on Thursday, 2 February 2012 12:34:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT