Re: [css-text-decor-3] are underline positions per-line or across lines?

On 05/06/2013 11:30 PM, L. David Baron wrote:
> On Monday 2013-05-06 19:07 -0700, fantasai wrote:
>> On 03/24/2013 09:18 PM, L. David Baron wrote:
>>> http://www.w3.org/TR/CSS21/text.html#decoration says:
>>>    # In determining the position of and thickness of text decoration
>>>    # lines, user agents may consider the font sizes of and dominant
>>>    # baselines of descendants, but must use the same baseline and
>>>    # thickness on each line.
>>>
>>> On the other hand,
>>> http://dev.w3.org/csswg/css-text-decor-3/#line-position says "user
>>> agents must consider, per line box, ..."
>>>
>>> If this change was an intentional change from CSS 2.1, the
>>> specification should say so.
>>>
>>> However, I prefer the CSS 2.1 behavior.  Having the
>>> underline calculated per-line-box means the behavior can differ
>>> depending on where line breaks happen.  This, I think, means that
>>> authors are more likely to produce content that works at some line
>>> widths and doesn't work at others.  It also seems inconsistent to
>>> me, although I'm not aware of common practice in other systems.
>>>
>>> What was the rationale for this change?
>>
>> Hm, it wasn't intended to be a change. My reading of 2.1 was that
>> "on each line" was a constraining clause, i.e. "within each line",
>> not "across all lines".
>
> Hmmm.  I'd never seen that it was even possible to read it that way,
> and I don't think it was intended that way, but I admit it could be
> read that way.
>
> That said, if that was what were intended, why would the "but must
> use the same baseline and thickness on each line" clause have been
> included at all?

Because before you'd have

<u>some text <big>big text</big> <small>small text</small></u>

and you'd get three different underlines.

~fantasai

Received on Tuesday, 7 May 2013 22:17:30 UTC