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

Re: [RC3] blocks-017 inaccurate height of wrapping div

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Thu, 11 Nov 2010 13:11:52 -0800
Message-ID: <620f62daf9433d1244b5d6fb23193906.squirrel@cp3.shieldhost.com>
To: "Řyvind Stenhaug" <oyvinds@opera.com>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>

Le Jeu 11 novembre 2010 4:22, Řyvind Stenhaug a écrit :
> On Wed, 10 Nov 2010 20:37:54 +0100, GĂ©rard Talbot
> <css21testsuite@gtalbot.org> wrote:
>> 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.
> http://lists.w3.org/Archives/Public/public-css-testsuite/2010Aug/0022.html
>> 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.
> They have "(-moz-)box-sizing: border-box" in their UA stylesheet.
> Relevant
> quote from CSS2.1 17.6.1:
> "However, in HTML and XHTML1, the width of the <table> element is the
> distance from the left border edge to the right border edge.

This is for width of the anonymous box and it is repeated in section
17.4 ("(...) The width of the anonymous box is the border-edge width of
the table box inside it (...).") [1]. In this testcase, height of the
table box, its top and bottom borders and the table with 'display:
block' set are involved.

The 2 tables have height: auto, not any specified height. The height of
table box (element content box) with its borders (border belt, border
area) should be rendered distinctively regardless of type of box-sizing
triggered. As it is, border-top-width and border-bottom-width are
substracted from the height of table box (or they are merged with the
height of table box): clientHeight of those table elements, even in
Opera 10.63, is 18px, not 20px.

"A value of 'auto' means that the height is the sum of the row heights
plus any cell spacing or borders." [2]

So, as I understand this, even a table with a 'height: auto' does not
include the table box borders for table elements in 'border-collapse:

Finally, 'display: block' set on the 2 table elements should make their
used height furthermore convincing. box-sizing remains border-box
(unchanged) even though those 2 table elements should be displayed as

Right now, there is no testcase in CSS 2.1 test suite that I know of,
except this one, testing a table element with 'display: block' set.

This particular testcase creates/triggers more issues than testing well
only one single CSS issue. As I said before, one idea would be to drop,
to remove the borders around the 4 black stripes in order to simplify
the testcase and make it more trustworthy. The testcase should be about
CSS 2.1, not about how clientHeight or offsetHeight is calculated.

[1]: http://www.w3.org/TR/CSS21/tables.html#model
[2]: http://www.w3.org/TR/CSS21/tables.html#height-layout
[3]: border widths are subtracted from table's intrinsic width

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (RC3; October 27th 2010):

CSS 2.1 test suite contributors:
Received on Thursday, 11 November 2010 21:12:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:16 UTC