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

Re: [css-text-decor-3] Processing model for text-underline-position: under | left | right

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 06 May 2013 19:42:45 -0700
Message-ID: <51886A25.2080408@inkedblade.net>
To: "L. David Baron" <dbaron@dbaron.org>
CC: www-style@w3.org
On 03/24/2013 09:52 PM, L. David Baron wrote:
> On Sunday 2013-03-24 21:09 -0700, L. David Baron wrote:
>> http://dev.w3.org/csswg/css-text-decor-3/#text-underline-position-property
>> says:
>>
>>    # ‘under’
>>    #   In horizontal writing modes, the underline is positioned
>>    #   relative to the under edge of the element's content box. In
>>    #   this case the underline usually does not cross the descenders.
>>    #   (This is sometimes called "accounting" underline.) If the
>>    #   underline affects descendants with a lower content edge, the
>>    #   user agent should shift the underline down further to the
>>    #   lowest underlined content box edge. The user agent may ignore
>>    #   elements with ‘vertical-align’ values given as lengths,
>>    #   percentages, ‘top’, or ‘bottom’ when making this adjustment.
>>    #   (Note that images that are not affected by the underline per
>>    #   ‘text-decoration-skip’ will not affect the position of the
>>    #   underline.)
>>
>> and similar for 'left' and 'right'.
>>
>>
>> It's not clear to me how these rules integrate with the processing
>> model for text decorations defined in
>> http://dev.w3.org/csswg/css-text-decor-3/#line-decoration
>>
>> I expect the specification to define a processing model that clearly
>> answers questions such as
>>
>>   * Does relative positioning of descendants affect the resulting
>>    position?  (Answer:  of course not!)

Should be covered by
   Relatively positioning a descendant [...] does not affect calculation
   of the decoration's initial position on that line.

>>  * Are descendants within the entire element considered, or is the
>>    rule applied line-by-line?

That's an open issue:
   http://lists.w3.org/Archives/Public/www-style/2013May/0145.html

>>    (If the latter, are descendant blocks to which the underline is
>>    propagated considered?)

I should hope not.

>>  * Are elements to which the underline does not apply because they
>>    have 'visibility: hidden' still considered when positioning the
>>    underline?  (Answer:  of course!)

Yes. Clarified.
   # graphical transformations likewise affect text decorations as part
   # of the text they're drawn on, even if the decorations were specified
   # on an ancestor box, <ins>and do not affect the calculation of their
   # initial positions or thicknesses</ins>.

>>  * Is overflow from atomic inline descendants considered?  (Answer:
>>    no, I hope.)

No. Clarified.
   # any descendants that do not participate in the decorating box’s
   # inline formatting context are excluded from consideration

>>  * Are content box edges inside atomic inline descendants
>>    considered?  (Answer:  No!)

No, see above.

> However, there are some annoying inconsistencies between sections
> 2.6 and 2.7, such as:

Yep. Looks like I forgot to remove that text when adding 2.7.

>   * whether atomic inlines in the line are considered (2.6 says yes
>     and refers to the content box, 2.7 implies no and refers to the
>     EM box).

Fixed to refer to content box.

>   * whether text-decoration-skip is mentioned (it is in 2.6, but not
>     in 2.7)

Fixed to specify that it is considered.

> It's also not clear which section overrides the other.  It seems
> like 2.7 tries to be the authoritative definition that overrides the
> vaguer prose in 2.6, but it has the above inconsistencies.

Merged into 2.7.

Please let me know if the recent edits address your concerns.

   http://dev.w3.org/csswg/css-text-decor-3/#text-underline-position

~fantasai
Received on Tuesday, 7 May 2013 02:43:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 May 2013 02:43:19 UTC