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

Re: [CSS21] Text-decoration "inheritance"

From: fantasai <fantasai@escape.com>
Date: Wed, 01 Oct 2003 18:47:08 -0400
Message-ID: <3F7B596C.2060902@escape.com>
To: www-style@w3.org

Jukka K. Korpela wrote:
>
> The text-decoration property as a whole is questionable. It should
> probably be preserved for compatibility reasons, but its name is heavily
> misleading, and most of its values are misleading.

Have you looked carefully at CSS3 text?
http://www.w3.org/TR/css3-text/#text-decoration-overview

 > The most common value, underline, could and probably should be replaced
 > by a bottom border.

Underlining and bottom border are two different effects.
Consider, for example,

:link {
   background: aqua;
   padding: 0.2em;
   text-decoration: underline;
}

:link {
   background: aqua;
   padding: 0.2em;
   border-bottom: solid thin;
}

The line would be drawn close to the text in the first example,
existing *within* the visual box presented by the background.

In the second example, however, the line would extend 0.2em beyond
the text and be positioned that much below it, accenting the bottom
edge of the background-color box in a rather different effect.

> For practical authoring, I have recommended the use of bottom border,
> rather than text-decoration: underline, for texts that may contain
> superscripts, subscripts, or other parts that have a baseline different
> from that of the rest. In fact, it could be better for normal text too, by
> separating the text better from the horizontal line under it.
> 
> And I think the specifications don't need any extra functionality, or any
> changes (from CSS 2.0), for the text-decoration property, except
> deprecation.

CSS3's text-underline-position: after-edge; would do a better job of
what you want.

> Line-though is questionable in most presentation environments...

Line-through is provided for effects like *striking out* text that
are marked to be deleted, not for making regular text stand out...

~fantasai
Received on Wednesday, 1 October 2003 18:47:10 GMT

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