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

Re: [CSS21] tables, percentages, and border-spacing

From: Gérard Talbot <www-style@gtalbot.org>
Date: Fri, 5 Oct 2012 22:29:34 -0400
Message-ID: <fdc40a6be8dc6b4ad3bf0fd6108cf57e.squirrel@ed-sh-cp3.entirelydigital.com>
To: "fantasai" <fantasai.lists@inkedblade.net>
Cc: "Simon Sapin" <simon.sapin@kozea.fr>, "www-style@w3.org" <www-style@w3.org>

>>>>> Le 04/10/2012 19:20, fantasai a écrit :
>>>>>> So, we don't really define how border-spacing affects the
>>>>>> percentage-sized
>>>>>> table cells in a fixed-size table. Apparently it's subtracted out of
>>>>>> the
>>>>>> available space for both width (and height) in FF and Opera, but
>>>>>> only
>>>>>> for
>>>>>> width in WebKit. Don't know about IE.
>>>>>> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cdiv%20style%3D%22border%3A%20solid%20orange%3B%20width%3A%20200px%3B%22%3E%0A%3Ctable%20style%3D%22border%3A%20solid%20blue%3B%20width%3A%20200px%3B%20border-spacing%3A%2033.3px%3B%22%3E%0A%3Ctd%20style%3D%22border%3A%20solid%20navy%3B%20width%3A%2050%25%22%3E%0A%3C%2Ftd%3E%0A%3Ctd%20style%3D%22border%3A%20solid%20fuchsia%3B%22%0A%3C%2Ftable%3E%0A%3C%2Fdiv%3E
>>>>>> Probably this should be defined and tested somewhere.:)
>>> Fantasai,
>>> I am working on a test where 'table-layout: fixed' would be declared.
>>> CSS2.1 doesn't
>>>>>> define height calculations for cells, but it does define widths.
>>> Correct.
>>>>> Is this for the "Fixed table layout" or the "Automatic table layout"?
>>>>> The test above uses the latter (initial value of the 'table-layout'
>>>>> property)
>>>>> which is non-normative in CSS 2.1. Anyone feels like reviving Tables
>>>>> level 3? :)
>>>> Interesting question. FF does different things for 'fixed' and 'auto',
>>>> though Opera and Chrome seem to do the same thing.

The decisive sentence of the spec influencing the following 3 tests is

a cell in the first row with a value other than 'auto' for the 'width'
property determines the width for that column.

and width of cell is not equal to width of column if the cell has
horizontal borders and/or horizontal padding.
The verb "determines" does not mean "is equal to".

So, as far as I can see, Firefox 15+ pass these 3 tests and other browsers
fail these 3 tests:

(In this 025 test, the cell in first row has horizontal padding)

(In this 026 test, the cell in first row has horizontal borders)

(In this 027 test, the cell in first row has horizontal borders and
horizontal padding)

CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Saturday, 6 October 2012 02:29:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:35:17 UTC