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: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 03 Jul 2008 16:05:15 -0700
Message-ID: <486D5B2B.7080009@inkedblade.net>
To: Zachary Weinberg <zweinberg@mozilla.com>
CC: www-style <www-style@w3.org>

Zachary Weinberg wrote:
> 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?

It is and it isn't. That model will tell you where to start and stop
the line. Then for thickness, color, and vertical position this sentence
comes into play:
   # In determining the position of and thickness of text decoration
   # lines, user agents may consider the font sizes of and dominant
   # baselines of descendants, but must use the same baseline and
   # thickness on each line.

> 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.

Might it help to read "If an element contains no text, user agents
must refrain from rendering these text decorations on the element"
as what it says and not imply "If an element contains text, user
agents must render these text decorations on the element" from it?

Received on Thursday, 3 July 2008 23:05:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC