W3C home > Mailing lists > Public > www-style@w3.org > May 2013

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

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 6 May 2013 23:30:36 -0700
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
Message-ID: <20130507063036.GA13055@crum.dbaron.org>
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?

> I don't have an opinion here, but we have three options:
>   1. Consistent position/thickness per decorating element
>      (across all lines)
>   2. Consistent position/thickness per line
>      (across all element fragments on the line)
>   3. Consistent position/thickness per element per line
> 
> I'm pretty sure #2 is not what we want, or else small text
> and large text on the same line but underlined independently
> would be forced to have the same position/thickness of line.
> 
> If you think #1 is better than #3, then I'm happy to update
> the spec to say so.

I do think #1 is better than #3.

> Here's my first attempt:
> 
>   # In determining the position of text decoration lines,
>   # user agents must consider, for each <i>decorating box</i>,
>   # the β€œideal” positions of such line decorations per fragment
>   # of the decorating box--or its in-flow inline descendant--
>   # that draws the text decoration.
> 
> Let me know if that seems to work or if I should try again...

I suppose so.  Though as I said in
http://lists.w3.org/Archives/Public/www-style/2013May/0151.html I'd
like to see the whole bit go away.

-David

-- 
π„ž   L. David Baron                         http://dbaron.org/   𝄂
𝄒   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 7 May 2013 06:31:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 May 2013 06:31:39 UTC