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

Zachary Weinberg wrote:
> ----- "fantasai" <fantasai.lists@inkedblade.net> wrote:
>> Zachary Weinberg wrote:
>>> CSS2.1 section 16.3.1 contains the sentence
>>>
>>> # If an element contains no text, user agents must refrain from
>>> # rendering text decorations on the element.
>>>
>>> Suppose, then, that you have something like
>>>
>>>   <del>one <span
>> style="display:inline-block"><span>two</span></span></del>
>>> Should the word "two" be crossed out?
>> If your example was
>>    <del>one <span><span>two</span></span></del>
>> then of course the line-through should cross "one" and "two".
>>
>> Your specific example runs into this clause, however:
>>
>> # [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>

then that is the example you should have given.

> My question is whether the DEL box should draw text decorations
> across a descendant box that stops propagation of text
> decorations, when that box does not have direct text children
> but does have descendant boxes that have text children.
> I am not comfortable considering such a box "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>. Or
for the inner span, really. You can only draw text decoration
for the inner span's *text*, and since no text decoration is
propagated through an inline block, no text decoration should
be drawn on the "all".

~fantasai

Received on Thursday, 3 July 2008 18:28:43 UTC