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

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.

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?

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 14 March 2012 21:42:53 UTC