W3C home > Mailing lists > Public > www-style@w3.org > October 2003

[CSS21] Text-decoration "inheritance"

From: <staffan.mahlen@comhem.se>
Date: Wed, 01 Oct 2003 18:56:27 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3F7B235B.20958.28A853@localhost>

Hi,
I am a bit puzzled by the...advanced...mechanism on text-decoration 
inheritance. Why not just let it be inherited and make it apply to 
text nodes only? 

The definition currently written seems to be sure to generate 
interoperability issues and i cannot see what the advantage for the 
author. The average author seems unlikely to assume the behaviour as 
written, and should not need to have the in-depth knowledge required 
to parse the description to use for instance underline. Even when it 
is clearly understood it seems to me that it will be easy to make 
errors trying to use it in a nested context.

An example:

<p>Text<img src="dummy.png"/><span>More text</span></p>

When an author sets 
p {text-decoration: underline} 
img {vertical-align: bottom}
span {display: block}
he will get a line drawn overlapping the image while the text in the 
span will not be underlined if i read the rec right. On the other 
hand, if he knew to add:
img {float: right}
the image would not be overwritten. I don't think that the way the 
definition makes colors of the underline work is very intuitive 
either, probably because i see underline and friends as text-features 
rather than box properties of the ancestor setting the text-
decoration?

 /Staffan
Received on Wednesday, 1 October 2003 12:57:50 GMT

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