- From: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>
- Date: Tue, 08 Jan 2013 16:48:44 +0100
- To: www-style@w3.org
> I believe this test > http://test.csswg.org/suites/css2.1/20110323/html4/clear-applies-to-015.htm > > may be incorrect. ... > which would mean that clear can/could apply to an element with its > display property set to 'table-caption'. So, at least the meta text > assert isn't completely true. I'd agree, since table-captions are block-level boxes (to which clear applies). CSS 2.1, 9.5.2: http://www.w3.org/TR/CSS21/visuren.html#flow-control > Applies to: block-level elements CSS 2.1, 17.4: http://www.w3.org/TR/CSS21/tables.html#model > The caption boxes are block-level boxes ... At this moment, however, it's not possible test whether a browser conforms. >> Note that if you had two captions in a CSS-styled table (something >> which is invalid in HTML4 tables), you could float both of them >> left and set "clear:left" on the second one, to observe that >> 'clear' does apply to table captions... although it isn't a very >> useful design pattern so I don't imagine authors do it much! A floated table-caption is a display: block; box and not part of anonymous table box generation. And even tough CSS does allow consecutive caption boxes, they are not supported by Gecko and WebKit. > 17.2.1 Anonymous table objects > http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes > > states that an anonymous 'table' (or 'inline-table') box T must be > generated for misparented 'table-caption' box... and so, it seems, > this implies that it does not create an anonymous table wrapper > box... A table box generates a table wrapper box according to CSS 2.1, 17.4: > In both cases, the table generates a principal block box called the > table wrapper box that contains the table box itself and any caption > boxes (in document order). > Anton, this is your scenario-example: > http://www.gtalbot.org/BrowserBugsSection/css21testsuite/clear-applies-to-caption-boxes-2.html > > I'm still a bit confused by all this. It's impossible to create a testcase to test whether clear really does apply to table-captions. A table-caption is always wrapped in a table wrapper box. A floated table-caption is actually display: block; see CSS 2.1, 9.7: http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo There can't be any element between the table wrapper box and a table caption except other table elements. Floats become wrapped in table-cells (or are not wrapped at all like in your testcase 2). In Gecko, you could try to test the caption-side: left, right, top-outside and bottom-outside which emulate CSS 2 behaviour of captions (but are currently not specced). But IIRC their implementation still places the caption inside the table wrapper box. I.e. you still couldn't create a test (or you could say they don't emulate CSS 2 correctly, but thats not seizable). -- Daniel Schattenkirchner
Received on Tuesday, 8 January 2013 15:49:12 UTC