W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2010

[RC3] blocks-017 inaccurate height of wrapping div

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 10 Nov 2010 11:37:54 -0800
Message-ID: <57c86bd27691ecb6b286a45327f3af6e.squirrel@cp3.shieldhost.com>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>

http://test.csswg.org/suites/css2.1/20101027/html4/blocks-017.htm

http://test.csswg.org/suites/css2.1/20101027/xhtml1/blocks-017.xht

I am sure I mentioned this testcase before.

The thin silver borders wrapping the 4 black stripes should count in the
calculation, just like they are in
http://test.csswg.org/suites/css2.1/20101027/html4/table-margin-004.htm

So,
1- thin should be replaced with 1px: why? to make sure the border-width
is computable and consistent across browsers.
2- for reasons I do not understand, Opera 10.63 and Firefox 3.6.12
ignore the border-top-width and border-bottom-width around the 2 tables
in the tables' offsetHeight. Instead of returning 22px for the
offsetHeight, they return 20px for the 2 tables.  The wrapping div
requires 184px in Opera 10.63 and Firefox 3.6.12 when it should require
188px in order to evenly space the 4 black stripes.

So,
  <style type="text/css">
   div {
     border: solid blue;
     height: 180px;
   }
   div > * {
     border: thin solid silver;
     margin: 1em;
     height: 1em;
     border-spacing: 0;
     display: block;
     font: 20px/20px Ahem;
   }

should be replaced by

 <style type="text/css">
 div
 {
 border: solid blue;
 height: 188px;
 /*
 20px (margin-top) + 1px + 20px (content) + 1px + max(20px, 20px) 1st table
 + 1px + 20px (content) + 1px + max(20px, 20px)  2nd table
 + 1px + 20px (content) + 1px + max(20px, 20px)  1st p
 + 1px + 20px (content) + 1px + 20px 2nd p
 --------------------------------------------------------
  188px
 */
 }

   div > * {
     border: silver solid 1px;
     margin: 1em;
     height: 1em;
     border-spacing: 0;
     display: block;
     font: 20px/20px Ahem;
   }

and the expected result should explicitly state "This test has passed if
the black bars are evenly distributed in the blue box. The gap between
the blue border at the top and the first black bar should be equal to
the gap between the 4th bar and the blue border at the bottom."

[Addendum

I now think the test should be redone so that a difference of gap in
height should be a lot more easily noticeable. 4px is a small
difference, barely noticeable...
An idea would be to drop the border on those 4 inner elements entirely.

I now think a smaller testcase targeting, aiming at testing
table {display: block; border: solid 10px;}
should be created.
]

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC3; October 27th 2010):
http://test.csswg.org/suites/css2.1/20101027/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/
Received on Wednesday, 10 November 2010 19:38:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 November 2010 19:38:49 GMT