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

Behavior on this is very inconsistent among browsers.

We think text-decoration should definitely propagate through
internal table elements to the cell contents. The spec seems
to say this in this sentence:

  "the decorations are propagated to an anonymous inline box
   that wraps all the in-flow inline children of the element,
   and to any block-level in-flow descendants"
                                  ^^^^^^^^^^^

This sentence says very clearly that in
  <div style="text-decoration: line-through">
    <table style="text-decoration: underline">
      <tr style="text-decoration: overline">
         <td>cell contents 1</td>
         <td><div>cell contents 2</div></td>
      </tr>
    </table>
  </div>
all three text decorations are applied to "cell contents 2".
No browser treats "cell contents 1" and "cell contents 2"
differently, and doing so would be very surprising to authors.

The opposite problem applies to 'inline-table' and 'inline-block':
A block inside an inline block or inline table would, from
a literal reading of the spec, be underlined if its ancestor
is underlined, but the direct contents of an inline-block itself
would not.


Proposal:
  In
    "the decorations are propagated to an anonymous inline box
     that wraps all the in-flow inline children of the element,
     and to any block-level in-flow descendants."
  Replace
    "in-flow descendants"
  With
    "in-flow children and internal table elements"
  Where "internal table elements" links to the definition at the
  end of 17.1.

--
fantasai and Arron Eicholz

Received on Monday, 21 July 2008 22:30:52 UTC