Re: [CSS21] text-decoration/visibility

On Thu, Nov 12, 2009 at 2:20 PM, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote:
> On Thu, Nov 12, 2009 at 1:13 PM, Øyvind Stenhaug <oyvinds@opera.com> wrote:
>> Right, I meant the cases without floats etc., such as an otherwise-unstyled
>> <span style="text-decoration:underline">A<span>B</span></span>
>> where I assume (haven't found anything explicit in the spec) that the first
>> span generates a single inline box that contains A but not B's box. For
>> "other elements" there's wording about an anonymous inline box, but not for
>> "inline element"s (whatever that means; display:inline?).
>
> I think that in the case you give, each span has its own inline box,
> and A's box contains B's.  The box generated by A's span contains all
> the (inline) contents of the span.  The underline is drawn under all
> the parts of A's box that happen to contain text, and that includes
> the part where B is.  So there's no propagation here.  The underline
> is drawn under A's box, not B's.  This is very relevant if, for
> instance, you replace <span>B</span> by <sup>B</sup>: B's box is then
> much higher, and if it has its own underline, that will be drawn
> higher.
(snip)

Thanks for the explanation, Aryeh.  I'd just twigged to exactly how
everything worked, and you laid it out very clearly.

The only thing that may be unclear about the visibility:hidden case is
the fact that making an element visibility:hidden suppresses all of
its drawing, including text-decoration it may have.  The visible child
doesn't 'gain' any decoration from the parent (normally the parent
just draws its decoration under the child by itself), so there's no
reason it should show the parent's decoration when the parent is
hidden.

It all makes sense.

~TJ

Received on Thursday, 12 November 2009 20:48:53 UTC