W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [CSS21] Default table border width in collapsing border model

From: Gérard Talbot <www-style@gtalbot.org>
Date: Wed, 4 Jan 2012 11:21:32 -0800
Message-ID: <72afa0385fb9ebfd8594ff6c36e79d3b.squirrel@gtalbot.org>
To: "Christian Roth" <roth@visualclick.de>
Cc: "www-style Mailing List" <www-style@w3.org>

Le Mer 4 janvier 2012 9:07, Christian Roth a écrit :
>

> That is the part I do not understand. Is the "initial left [...] border
> width of the table" that needs to be calculated per 17.6.2 not used (as
> the initial and then further computed value) for a table border that does
> not explicitly specify a width (as in my case)?

The initial, default border width is medium (which is computed as 3px for
all mainstream browsers). Such left border-width 3px value for the table
box is going to be involved when going through border conflict resolution
mechanisms.

8.5.1 Border width
http://www.w3.org/TR/CSS21/box.html#border-width-properties
'border-top-width', 'border-right-width', 'border-bottom-width',
'border-left-width'
    Value:  	<border-width> | inherit
    Initial:  	*_medium_*
    Applies to:  	all elements


> I read this passage as
> effectively saying: "For tables using the collapsing border model, the
> initial border-left-width of the table is half of the first cell's
> collapsed border (i.e., not 'medium')."

That, I believe, is for calculation of table width and row width and
border-left-width/border-right-width of table box. This is not involved in
border conflict resolution. That passage is for answering: once border
conflict has been applied, then what is the border-left-width of the
table?


> Obviously, I am wrong here. But then, I do not understand what for an
> initial table border width needs to be calculated at all, and where it
> matters in the rendering.

This would be a long answer ...

>
> Also, why cannot the initial table border width be the (full) width of the
> first cell's collapsed border, when all those borders are centered on the
> grid lines anyway?

The red grid lines in the diagram of section 17.6.2
http://www.w3.org/TR/CSS21/tables.html#collapsing-borders
serve, among other purposes, to identify
- where the table box starts
- where the horizontal borders of such table box are
- where are (start and end) the left-border of the leftmost cell in a row
- where are (start and end) the right-border of the rightmost cell in a row


As it is, even the first cell's border would already
> spill in the margin area of the table, since it extends beyond the
> (centered) initial table border which is only half of its size.

Yes it does spill into margin area of table box. The first cell's left
border (50px) will have half of its width spill into margin area of table
box once border conflict have been resolved.

Christian, I agree with you that all this is at first rather difficult to
understand.

Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Wednesday, 4 January 2012 19:24:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT