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

[CSS21][css3-images] clarify the case when an intrinsic dimension is zero

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Thu, 07 Mar 2013 15:41:56 +0800
Message-ID: <513844C4.1020001@oupeng.com>
To: WWW Style <www-style@w3.org>
Just a corner case that the spec(s) doesn't provide clear answer. Changing

  # 1. If the object has an intrinsic aspect ratio, the missing
  # dimension of the concrete object size is calculated using the
  # intrinsic aspect ratio and the present dimension.

to

  | 1. If the object has an intrinsic aspect ratio, the missing
  | dimension of the concrete object size is calculated using the
  | intrinsic aspect ratio and the present dimension, if possible.

in the Default Sizing Algorithm might do the trick and it seems that
browsers have been doing so. (testcase: <!DOCTYPE html><style>canvas {
border: red solid; width: 1em; }</style><canvas width=0 height=0></canvas> )


I am not sure about CSS 2.1. Seeing how this works with constrained
specified size might be fun ;)



Cheers,
Kenny
-- 
Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Thursday, 7 March 2013 07:42:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT