Re: [CSS21] [css3-text] Text decoration behavior

On Tuesday 2008-03-04 14:00 -0800, Paul Nelson (ATC) wrote:
> Take a look at the attached document in Firefox. There are many levels
> of lines. In IE7 we see just one underline.

I think meeting the following requirements are probably more important
than dealing with your testcase correctly:

 (1) a single underline shouldn't vary in position and thickness

 (2) underlines should use the position/thickness from the font metrics,
 unless it breaks (1)

These are why we want the position and thickness of an underline to
come from the font metrics on the element being underlined.

I suppose, to fix the case you bring up, we could require that when
there are multiple nested underlines, the font metrics for the element
that has the outermost of those underlines are used for all of them.
But nested underlines seem like an edge case, and I'd be interested to
know why people would use them.  I can think of two reasons, and this
change would help one of them and hurt the other:

 * (helps) to change the color of an underline for one word

 * (hurts) to underline a subscript for effects like writing "Mr." with
   the r as a subscript, when the whole thing happens to fall in the
   middle of a hyperlink

I suppose the latter could be re-fixed by only searching for the
outermost underline through elements that are baseline-aligned to
each other.

However, both of these improvements seem like edge cases, and I'm not
sure they're worth the complexity.  How often do these cases really come
up?

> I believe that we need to change the 'text-decoration' wording in
> CSS 2.1 to read something like:
>
>     "..., but should use the same baseline and thickness on each line."

Where are you proposing this change, exactly?

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Tuesday, 4 March 2008 22:30:01 UTC