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

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

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Mon, 21 Jul 2008 15:30:09 -0700
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <66D5CB5D6AB0694592FAF5487C50368B21236A02C6@NA-EXMSG-C111.redmond.corp.microsoft.com>

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 GMT

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