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

Re: [CSS2.1] What counts as "an element which contains no text" for the rules in 16.3.1?

From: Zachary Weinberg <zweinberg@mozilla.com>
Date: Thu, 3 Jul 2008 15:33:19 -0700 (PDT)
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style <www-style@w3.org>
Message-ID: <3114221.101721215124399360.JavaMail.root@cm-mail01.mozilla.org>

----- "fantasai" <fantasai.lists@inkedblade.net> wrote:
> Zachary Weinberg wrote:
> >> # [Text decoration] is not, however, further propagated to floating
> >> # and absolutely positioned descendants, nor to the contents of
> >> # 'inline-table' and 'inline-block' descendants.
> > 
> > That was deliberate; the question is moot if the inner SPAN
> > is drawing its own text decorations.
> 
> I have no idea what you mean. If you wanted to discuss this
> example:
> 
>    <del style="display: inline-block"><span>two</span></del>

No, I intended for there to be text inside the <del> but outside
the <span>, too, although I can see where it might not actually matter.

> > I am not comfortable considering [a box with descendant text,
> > but no direct text children] "an element which contains no
> > text" without further clarification; it's too fine a hair
> > to split.
> 
> Such a box does contain text. But underlines, overlines, and
> line-throughs are applied to text, not to boxes:
> 
>    # Underlines, overlines, and line-throughs are applied only
>    # to text (including white space, letter spacing, and word
>    # spacing): margins, borders, and padding are skipped.
> 
> so you can't draw text decoration for the outer <span>.

I admit I may be thinking of things a bit too much in terms of
Gecko's current, buggy, implementation, but it's not as simple as
propagating text-decorations all the way down to individual text boxes
(stopping where specified, of course), is it?  Because of things like

  <del>X<sub>i</sub><sup>2</sup></del> 

and

  <ins>little, <span style="font-size: larger">big</span></ins>

where (assuming it all fits on one line) you should draw just one line, even
though there are several inline boxes, right?  What Gecko currently does 
is draw one line from one end of each line box to the other, taking into 
account baseline and vertical height variation due to inline boxes within
that box.  That's buggy because it will draw a line across all boxes within
the line box, even when they genuinely contain no text (e.g. an <img>)
But when you have a display:inline-block box within a line box, and that
box does (transitively) contain text, the spec still seems ambiguous to me.

zw
Received on Thursday, 3 July 2008 22:34:01 GMT

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