[CSS21] should text-decoration propagate to table-cells from table or above?

Consider the fragment

<div style="text-decoration:line-through">
<table style="text-decoration:underline">
<tr style="text-decoration:overline">
<td>cell contents</td></tr></table></div>

(Assume strict HTML4 with no other explicit CSS rules in effect.)  What visual rendering should this have; in particular, what decorations should be applied to the text "cell contents"?  A TABLE is a block-level element, but TD and TR are not - but they're not inline-level elements either.  Thus a literal reading of the propagation rules in CSS2.1 section 16.3.1 suggests that no lines are drawn at all.

Gecko-based browsers in standards mode do not draw any lines.  In quirks mode, they draw all three lines. Opera and Safari always draw all three lines.  IE7 draws only the overline.

I don't have a strong opinion on the Right Thing here, but I'd say that the least surprising thing is for all three lines to be drawn.  I'm not sure how to phrase that in standardsese - I find it somewhat surprising that TD and TR are not block-level elements, but perhaps changing that would break other things.

zw

Received on Friday, 25 April 2008 04:58:40 UTC