W3C home > Mailing lists > Public > www-style@w3.org > April 2008

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

From: Zachary Weinberg <zweinberg@mozilla.com>
Date: Thu, 24 Apr 2008 21:57:56 -0700 (PDT)
To: www-style <www-style@w3.org>
Message-ID: <12640751.85871209099476100.JavaMail.root@cm-mail01.mozilla.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:05 GMT