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

Re: [css3-images] Images with an intrinsic aspect ratio and exactly one of an intrinsic height or width

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 14 Mar 2012 16:18:03 -0500
To: www-style@w3.org
Message-ID: <20120314211803.GA17294@pickering.dbaron.org>
On Wednesday 2012-03-14 16:04 -0500, L. David Baron wrote:
> The prose in http://dev.w3.org/csswg/css3-images/#default-sizing
> (5.3, Default Concrete Object Size Resolution) seems to assume that
> if an image has an intrinsic aspect ratio, it either has neither or
> both of an intrinsic width and height.
> 
> In particular, if you work through the rules given an image with an
> intrinsic aspect ratio and exactly one of an intrinsic width or
> height, bad results occur in this case:
> 
>   # If the specified size has neither a definite width nor height,
>   # and has no additional contraints, the dimensions of the concrete
>   # object size are calculated as follows: 
>   #
>   # 1. If the object has only an intrinsic aspect ratio, the
>   #    concrete object size must have that aspect ratio, and
>   #    additionally be as large as possible without either its height
>   #    or width exceeding the height or width of the default object
>   #    size. Otherwise, the width and height of the concrete object
>   #    size is the same as the object's intrinsic width and intrinsic
>   #    height, if they exist. 
> because of the use of the phrase "has only an intrinsic aspect
> ratio" which I assume means "has an intrinsic aspect ratio but has
> neither an intrinsic width nor intrinsic height" (though it's really
> not at all clear).

Actually, I now realize I may have misunderstood this section.  It's
pretty confusing because, unlike the other bullets the "If" at the
beginning of the first bullet isn't really a prefix for that whole
bullet.  I think it would be clearer to change this text:

  # If the specified size has neither a definite width nor height,
  # and has no additional contraints, the dimensions of the concrete
  # object size are calculated <DEL>as follows</DEL><INS>as though
  # the following steps were taken</INS>:
  #
  # <DEL>
  # 1. If the object has only an intrinsic aspect ratio, the
  #    concrete object size must have that aspect ratio, and
  #    additionally be as large as possible without either its
  #    height or width exceeding the height or width of the default
  #    object size. Otherwise, the width and height of the concrete
  #    object size is the same as the object's intrinsic width and
  #    intrinsic height, if they exist.
  # </DEL>
  # <INS>
  # 1. First:
  #    a. If the object has <DEL>only</DEL> an intrinsic aspect
  #       ratio <INS>but not an intrinsic width or intrinsic
  #       height</INS>, the concrete object size must have that
  #       aspect ratio, and additionally be as large as possible
  #       without either its height or width exceeding the height or
  #       width of the default object size.
  #    b. Otherwise, the width and height of the concrete object
  #       size is the same as the object's intrinsic width and
  #       intrinsic height, if they exist.
  # </INS>
  # 2. <INS>Second, </INS>If the concrete object size is still
  #    missing a width or height<DEL>, and the object has an
  #    intrinsic aspect ratio, the missing dimension is calculated
  #    from the present dimension and the intrinsic aspect ratio.
  #    Otherwise, each missing dimension is taken from the default
  #    object size. </DEL><INS>:
  #    a. If the object has an intrinsic aspect ratio, the missing
  #       dimension is calculated from the present dimension and the
  #       intrinsic aspect ratio.
  #    b. Otherwise, each missing dimension is taken from the
  #       default object size.</INS>

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Wednesday, 14 March 2012 21:18:28 GMT

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