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: Fri, 12 Nov 2010 10:22:50 -0800
Message-ID: <dd3b806710e091edcba29a17daa6ffc6.squirrel@cp3.shieldhost.com>
To: "Øyvind Stenhaug" <oyvinds@opera.com>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>



Le Ven 12 novembre 2010 5:33, Øyvind Stenhaug a écrit :
> On Thu, 11 Nov 2010 22:11:52 +0100, Gérard Talbot
> <css21testsuite@gtalbot.org> wrote:
>> 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:
>>>> 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].
> Regardless, the box-sizing property applies for both width and height.
>> 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.
> First of all, I can only make a limited amount of sense out of the table
> chapter, but all the browsers I have here include borders as part of the
> <table> height.
> Second, while the anonymous table boxes do have auto height, the <table>
> elements do not. The "div > *" rule sets it to 1em.

This vital information slipped out of my mind (importantissimo oversight
on my part) while editing the email. Sorry about that. Yes, height is
set to 1em, not auto.

>> 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
>> blocks.
> Not sure what you mean here. Yes, it remains 'border-box', since the UA
> stylesheet just targets <table> and can't limit itself to cases where
> 'display' is 'table'. So that means the height of the content box is
> expected to be 18px.

Again, you are correct here. I missed that too.

>> 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.
> Yes, that seems like a good idea, since the test seems to be about
> margin
> collapsing and not table height calculations.

Okay! :)

>> [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
>> https://bugzilla.mozilla.org/show_bug.cgi?id=96463

best 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 Friday, 12 November 2010 18:23:29 UTC

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