W3C home > Mailing lists > Public > www-style@w3.org > August 2011

[css3-background] 'background-size: auto auto' and images with intrinsic size in one dimension

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 5 Aug 2011 16:37:37 -0700
To: www-style@w3.org
Message-ID: <20110805233737.GA30205@pickering.dbaron.org>
http://dev.w3.org/csswg/css3-background/#the-background-size doesn't
explicitly say what to do when 'background-size' is 'auto auto' and
the background image has only one of an intrinsic width or height,
and does not have an intrinsic ratio.  What it currently says is:

  # An ‘auto’ value for one dimension is resolved by using the
  # image's intrinsic ratio and the size of the other dimension, or
  # failing that, using the image's intrinsic size, or failing that,
  # treating it as 100%.
  #
  # If both values are ‘auto’ then the intrinsic width and/or height
  # of the image should be used, if any. If the image has neither an
  # intrinsic width nor an intrinsic height, its size is determined
  # as for ‘contain’. 

It seems reasonable, however, to infer that the sensible behavior is
to use the rule for a single 'auto' value, and fall back to 100% if
the image has no intrinsic size in that dimension.

I think the spec should say this explicitly, though.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla Corporation               http://www.mozilla.com/   𝄂
Received on Friday, 5 August 2011 23:38:00 GMT

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