[CSS21] Question on section 17.5.2.1: optional recourse of the algorithm of 10.3.3

Hello,

Section 17.5.2.1 Fixed table layout
http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout
states the following

[
The table's width may be specified explicitly with the 'width' property. A
value of 'auto' (for both 'display: table' and 'display: inline-table')
means use the automatic table layout algorithm. However, if the table is a
block-level table ('display: table') in normal flow, a UA may (but does
not have to) use the algorithm of 10.3.3
http://www.w3.org/TR/CSS21/visudet.html#blockwidth
to compute a width and apply fixed table layout even if the specified
width is 'auto'.

If a UA supports fixed table layout when 'width' is 'auto', the following
will create a table that is 4em narrower than its containing block:

table { table-layout: fixed;
        margin-left: 2em;
        margin-right: 2em }
]
http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout

but, as far as I can see this, no known browser implements the algorithm
of 10.3.3 so that the width of such table gets to be 4em narrower than its
containing block. If I'm wrong, then please demonstrate this with a
testcase: I would be very interested to see such.

[Addendum]

2 tests

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/fixed-table-layout-001x.html

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/fixed-table-layout-001y.html

No browser (explicit list: Firefox 14.0.1, Opera 12.0.1, Chrome
21.0.1180.81, Konqueror 4.9.0) centers the black stripe within the blue
rectangle in both tests.

Even if div#containing-block has a set width (say, 800px or 900px), the
table will still not size itself to its containing block in both tests.

[/Addendum]


Now, if no browser use the algorithm of 10.3.3, then why should such
possibility still be mentioned/remain in section 17.5.2.1 ?

I am for removing the whole block that starts with
"However, if the table"
to
"margin-right: 2em }"

Gérard Talbot
-- 
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



-- 
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 Friday, 24 August 2012 23:46:27 UTC