Re: Text-Decoration

Ian Hickson wrote:
> FYI, there are at least the following problems on that page:
> 
>  + test 9 uses attribute "class" instead of "style".
>  + similarly with test 10.

Thanks for pointing it out. This has now been corrected.

>  + test 23 is incorrect, as according to CSS2, "conforming user agents"
>    (i.e. those that recognise all of CSS2) "are not required to support
>    this value".

It is true that they are not required to support it, but:
'If there hasn't been any blinking in the rest of the document, this
should be underlined. (text-decoration: underline; text-decoration:
blink).'

is valid, since if they don't support it they should ignore it and
revert to the previous value.

>  + test 28 is wrong, since the spec does not say "t-d only spans
>    descendant inline elements", as quoted, it says "If the property is
>    specified for a block-level element, it affects all inline-level
>    descendants of the element", and the contents of line boxes are
>    definitely inline-level.

Your quote is true, but it says 'descendants' not 'descendant boxes'. If
'descendants' meant 'descendant boxes', it would say so. Since it does
not, it would be wrong to treat it as anything other than 'descendant
elements'.

I have pointed this out before: 

<blockquote
cite="http://lists.w3.org/Archives/Public/www-style/2000Jan/0200.html">
It is not possible to interpret the spec in any other way -
'inline-level
descendants' means inline descendant elements.

If what was meant was 'inline descendant boxes', then that would have
been
said, but it wasn't :
1. the use of 'descendants' implies elements
2. 'inline-level' is an attribute only used in terms of _elements_ - not
boxes.

It is not possible to draw the conclusion that you have done.
</blockquote>

You replied saying (inter alia):

> You seem to have forgotten _anonymous_ elements. 

To which I replied:

That statement is oxymoronic. An element cannot be anonymous by
definition (although _boxes_ can).

------

>  + test 30 is unclear. It should point out that the baseline for the
>    section with the large text is ABOVE the baseline of the large text
>    itself (because of the "vertical-align:sub" declaration).

No it isn't:

<q cite="http://www.w3.org/TR/REC-CSS2/visudet.html#line-height">
sub 
     Lower the baseline of the box to the proper position for subscripts
of the parent's box. 
</q>

It says that the baseline is lowered, so the underline is on the
baseline; i.e., the underline is just below the text.

I have also pointed this out before, but I can't find the archive
reference right now.

>  + similarly for test 31.

Similarly the baseline is moved I think you'll find. 

>  + test 32 is wrong, there should be two sets of underlines (for
>    reasons which I feel have been discussed to death on this list.)
>  + similarly for test 33.

No I disagree. The underline of the descendant element is rendered on
top of that of the ancestor element so although the underline is there,
it is obscured.

>  + tests 34, 35 and 36 are wrong for similar reasons; as far as I can
>    tell the child elements are not given explicit text-decorations and
>    so the decorations should be drawn by the parent inline element,
>    thus they should not be broken as your tests suggest.

I disagree. CSS states that text-decoration 'affects' inline descendant
elements - it does not say that it spans them. To span them gives ugly
results.

>  + test 40 is incorrect, because regardless of the position of the
>    image, the underlining should span the entire inline element (in
>    this case the line box or anonymous inline box depending on your
>    interpretation of the spec).

I disagree. CSS says quite plainly that text-decoration does not affect
images (for example, you wouldn't want your images lined-throughed).

>  + test 42 is invalid since it is missing an 'src' attribute
>    (mandatory in HTML -- do you not validate your pages?).

The src attribute is missing, you are quite correct. But the reason that
it is missing is that there isn't an image there! The test is testing
underling of alt text. I have added a src attribute to it (to
nota404.gif so that it doesn't confuse my error logs) that refers to a
nonexistent image. That there was no 'src' should not affect the result,
however.

>  + test 43 is clearly wrong, since the two tests do not even have the
>    same text!

The tests do not have the same text but that doesn't make them wrong -
it doesn't affect the result. One uses the speed of light as the number
and the other does not. They now both use the speed of light. I hope
that is more to your liking.

So actually all the tests were ok for CSS, except for the two typos.

Received on Friday, 31 March 2000 07:41:43 UTC