W3C home > Mailing lists > Public > www-style@w3.org > November 2009

Re: [CSS21] text-decoration/visibility

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 12 Nov 2009 14:48:06 -0600
Message-ID: <dd0fbad0911121248q5ea5dd65tad42446cf54b94fe@mail.gmail.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
Cc: Øyvind Stenhaug <oyvinds@opera.com>, www-style@w3.org
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.

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

It all makes sense.

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:41 UTC