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

Re: [css-text-decor-3] text-decoration model should account for 'objects' ∉ 'text-decoration-skip'

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 6 May 2013 23:02:09 -0700
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
Message-ID: <20130507060209.GA12331@crum.dbaron.org>
On Monday 2013-05-06 18:16 -0700, fantasai wrote:
> On 03/24/2013 07:01 PM, L. David Baron wrote:
> >http://dev.w3.org/csswg/css-text-decor-3/#line-decoration describes
> >the model for text-decoration drawing, largely analogous to the
> >model described in the text chapter of CSS 2.1:
> >http://www.w3.org/TR/CSS21/text.html#decoration
> >CSS 2.1's model for text-decorations also includes its rules on
> >z-ordering of text-decorations in
> >http://www.w3.org/TR/CSS21/zindex.html
> >
> >http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-skip adds
> >a new text-decoration-skip property.  When this property's computed
> >value does not contain 'objects', text decorations are drawn on
> >atomic inlines.
> >
> >
> >The z-ordering of the text-decorations drawn on atomic inlines also
> >needs to be specified in such a way that a reader could determine
> >exactly where in Appendix E of CSS 2.1 it fits.  It is currently
> >unspecified, as far as I can tell.
> 
> Good point. Added a new chapter on that:
>   http://dev.w3.org/csswg/css-text-decor/#painting-order
> 
>   # As in [CSS21], text decorations are drawn immediately over/under
>   # the text they decorate, in the following order (bottommost first):
>   #
>   #  1. shadows (‘text-shadow’)
>   #  2. underlines (‘text-decoration’)
>   #  3. overlines (‘text-decoration’)
>   #  4. text
>   #  5. emphasis marks (‘text-emphasis’)
>   #  6. line-through (‘text-decoration’)
>   #
>   # Where line decorations are drawn across box decorations or
>   # atomic inlines, they are drawn over non-positioned content
>   # and just below any positioned descendants (immediately
>   # below layer #8 in CSS2.1 Appendix E).
> 
> Let us know if that seems correct/sufficient!

This doesn't seem quite sufficient since shadows are composed of:
 * underlines
 * overlines
 * text
 * emphasis marks (I assume, but it should be specified!)
 * line-through
as specified in
http://dev.w3.org/csswg/css-text-decor-3/#text-shadow-property
(except for the lack of mention of emphasis marks).

I think the obvious adjustment to place all of these items inside
the shadows item in the same order they are for normal drawing would
be sufficient to fix this.

> >The model
> >(http://dev.w3.org/csswg/css-text-decor-3/#line-decoration) says:
> >   # The ‘visibility’ property, ‘text-shadow’, filters, and other
> >   # 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.
> >
> >This also needs to specify how these effects work with atomic
> >inlines.  For example, I would expect 'visibility' on an atomic
> >inline that is decorated because of text-decoration-skip to change
> >the visibility of the decoration, but I would not expect
> >'visibility' on its descendants to do so.  Likewise, I would expect
> >the rules for application of filters to be consistent with the rules
> >for z-ordering.
> 
> Added
>   # (In the case of line decorations drawn over an atomic inline
>   # or across box decorations, they are similarly associated with
>   # the affected box rather than the decorating box.)
> to that paragraph. Let me know if that's sufficiently clear...

Does "box decorations" mean "margin, border, and padding"?  I think
it should be clearer to say so, and perhaps also say that that
wording applies specifically to the margin, border, and padding only
of non-replaced inline boxes.

I think it might also help to say "the affected atomic inline box or
non-replaced inline box".

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 7 May 2013 06:02:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 May 2013 06:02:34 UTC