fill' apparently mandates filling the content box from Leif Arne Storset on 2012-02-01 (www-style@w3.org from February 2012) (original) (raw)

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 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...] #

[0] A pivotal post in the discussion about this: http://lists.w3.org/Archives/Public/www-style/2010Feb/0164.html

-- Leif Arne Storset Core Technology Developer, Opera Software Oslo, Norway

Received on Wednesday, 1 February 2012 14:34:44 UTC