- From: Anton Prowse <prowse@moonhenge.net>
- Date: Fri, 24 Sep 2010 20:38:00 +0200
- To: "www-style@w3.org list" <www-style@w3.org>
- CC: www-style@gtalbot.org
On 24/09/2010 17:24, Boris Zbarsky wrote: > On 24/09/2010 08:43, "Gérard Talbot" wrote: >> Hello all, >> >> I wish to have your feedback, comments or explanations on 4 testcases. >> >> 1- >> http://test.csswg.org/suites/css2.1/20100917/html4/inline-replaced-width-007.htm >> >> Why should the blue square be as wide as the orange square? >> >> Why the blue square could not be half the width of the orange square? >> >> Right now, Chrome 6.0.472.62 render this testcase differently from Firefox >> 3.6.10 and from Opera 10.62. I do not see anything in the spec which can >> decisively state which rendering is correct. I even think that such >> testcase should be removed as it could be rendered both ways (depending on >> algorithm chosen). Am I wrong? >> > I believe the spec explicitly states that the rendering of this testcase is > undefined.... (section 10.2 last paragraph under <percentage>, plus the > complete lack of any useful definition of shrink-to-fit sizing). It's an > interop problem that the renderings differ, of course. >> >> 2- >> http://test.csswg.org/suites/css2.1/20100917/html4/block-replaced-width-007.htm >> >> Why should the blue square be as wide as the orange square? >> >> Why the blue square could not be instead half the width of the orange square? >> >> 3- >> http://test.csswg.org/suites/css2.1/20100917/html4/float-replaced-width-012.htm >> >> Same questions here too. >> >> 4- >> http://test.csswg.org/suites/css2.1/20100917/html4/absolute-replaced-width-007.htm >> >> Spec quotes: >> >> "lengths expressed as percentages [for the height or width HTML >> attribute for<img>] are based on the horizontal or vertical space >> currently available, not on the natural size of the image, object, or >> applet. >> " >> http://www.w3.org/TR/html4/struct/objects.html#adef-width-IMG >> >> "Percentage intrinsic widths are first evaluated with respect to the >> containing block's width, if that width does not itself depend on the >> replaced element's width. If it does, then the resulting layout is >> undefined in CSS 2.1." >> http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width >> > The HTML4 spec is irrelevant here. Note that the percentage here is NOT > a percentage intrinsic width. It's just a percentage specified width. > And section 10.2 says that even the computed value of width (forget the > used value) is undefined in this case... I think Gérard's point was precisely that the blue square /is/ half its intrinsic width (48px instead of 96px) in several browsers. Whilst the width of the square is undefined in full generality, CSS21 10.2 (in agreement with HTML4) makes it clear that the /intent/ is that the width not depend on the intrinsic width; it's not unreasonable to expect UAs to avoid to shrinking the blue square to half its intrinsic width in these fairly simple test cases which don't involve unsolvable constraints. Anyhow, that observation aside, it seems that these test cases should be removed from the test suite. Cheers, Anton Prowse http://dev.moonhenge.net
Received on Friday, 24 September 2010 18:38:54 UTC