- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 27 Apr 2004 00:04:58 +0000 (UTC)
- To: Ernest Cline <ernestcline@mindspring.com>
- Cc: W3C CSS List <www-style@w3.org>
On Mon, 26 Apr 2004, Ernest Cline wrote: > > Example: > > <style> > td::outside { /* */} > </style> > <table> > <tr> > <td>X</td> > </tr> > <table> > > Now in the flow there is an anonymous box <td::outside> between > a table-row element <tr> and a table-cell element <tr> No, there isn't. ::outside will only exist if given an explicit 'display' value. But assuming you had: td::outside { display: inline; } ...then: > If <td::outside> is anything other than an:table-cell, there will be > additional anonymous boxes generated between <tr> and <td::outside> by > the CSS table model [1] If <td::outside> is anything other than a > table-row. there will be additional anonymous boxes generated between > <td::outside> and <td>. Yes. Why is this a problem? It's just the same as if you were adding an actual element. Why does this require this "to [be] carefully considered if not outright banned"? > Further reflection has caused me to consider that this could be > remedied by adding the following CSS: > td::outside {display:table-cell} > td {display: block} > to avoid generating the extra anonymous boxes, but it would be a good > idea to point out the problem and a potential solution that works > reasonably well for this case. Yes, I agree this should be mentioned, if it isn't already. > However, note that in solving the problem, I have side-stepped it, as > <td> is no longer a table-cell. You could also side-step it just with: td::outside { display: table-cell; } ...without changing the inner <td> element's display. Since it is the only "child" of the ::outside pseudo-element, it will just have its own table. -- Ian Hickson )\._.,--....,'``. fL U+1047E /, _.. \ _\ ;`._ ,. http://index.hixie.ch/ `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 26 April 2004 20:05:07 UTC