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

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?

~fantasai

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