Re: [CSS21] 16.3.1 text-decoration: inline box vs. inline element

After further thought, I'm even more confused about CSS 2.1
section 16.3.1 (text-decoration).  It says:

>     When specified on an inline element, it affects all the boxes
>     generated by that element; for all other elements, 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.

I couldn't find an explicit definition of "in-flow", but it seems to
mean simply in the normal flow as opposed to floating or absolutely
positioned.

Now consider the second example in that section:

   blockquote { text-decoration: underline; color: blue; }
   em { display: block; }
   cite { color: fuchsia; }
   <blockquote>
    <p>
     <span>
      Help, help!
      <em> I am under a hat! </em>
      <cite> -GwieF </cite>
     </span>
    </p>
   </blockquote>

The <em> element is block-level (because of the display:block), and it's
in-flow (not floating or absolutely positioned), so why isn't the text
decoration propagated to it?  The explanation given is:

    The <em>text</em> in the em block is not underlined at all, as it is
    not contained in the same anonymous inline element.

How can that be?  Elements are features of the document structure,
independent of layout, right?  If the anonymous element contains both
"Help" and the cite element, then it must contain the em element between
them, no?

The crucial difference between the em element and the cite element in
this example seems to be that the cite element is inline-level, while
the em element is block-level.  But when the propagation rule says that
the decorations are propagated "to any block-level in-flow descendants",
what is it talking about?  Can someone extend the example to include
such things?

I'm also confused by the mixture of "elements" and "boxes" in this
sentence:

    Text decorations on inline boxes are drawn across the entire
    element...

Finally, I'm not sure whether the various decorations are supposed to be
cummulative or mutually exclusive.  For example:

    <span style="text-decoration:underline">
      one <span style="text-decoration:overline">two</span> three
    </span>

Is the word "two" both underlined and overlined?  Or is it only
overlined?

Thanks,
AMC
http://www.nicemice.net/amc/

Received on Wednesday, 31 March 2004 09:11:37 UTC