[csswg-drafts] [css-ruby-1] Define extent of underline for ruby (#5996)

frivoal has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ruby-1] Define extent of underline for ruby ==

Text decoration on ruby is [currently specified](https://www.w3.org/TR/css-ruby-1/#ruby-text-decoration) as:

> Text decoration does not propagate from the base text to the annotations.
> 
> When text decoration is specified on an ancestor of the ruby, it is drawn across the entire content area of the ruby base container, including any extra space added on either side of the ruby base contents to accommodate long annotations. When text decoration is specified on a ruby base itself, this extra space is not decorated, similar to how a box’s own padding is not decorated when text decoration is specified directly on that box. [CSS3-TEXT-DECOR]
> 
> Text decoration may be specified directly on ruby base containers and ruby annotation containers: in such cases it is propagated to all of the container’s bases or annotations (respectively), and is also drawn between them for continuity.

When underlining on bases and annotations individually, the definition seems reasonable, though I wonder whether underlining the extra space can be controlled by one of the `text-decoration-skip-*` properties (maybe text-decoration-skip-spaces?). The definition for decorations specified on an ancestor of the ruby seems fine too.

However, when decorating containers, this definition seems different from the normal way text decorations work and incomplete (e.g. what if the different bases in a container have a different vertical-align?). Maybe drawing the underline as if there was an anonoymous inline box wrapping all the bases / annotations in the base container / annotation container would be more consistent with how we usually do things, and give a more consistent answer as to the applicability of the `text-decoration-skip-*` properties. (Whether you actually need that anonymous box would be up to implementations, as long as the resulting underline is the same.)

PS: The spec also doesn't consider the effect of underlining on inter-character annotations. Maybe we want `ruby {text-decoration-skip-self: none:}` in the UA stylesheet so that ancestor text-decorations will draw across them (since they're now defined as atomic inlines)?

Relatated comments previously made:

@upsuper https://lists.w3.org/Archives/Public/www-style/2015Feb/0096.html
@patrickdark https://lists.w3.org/Archives/Public/www-style/2016Dec/0106.html

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5996 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 15 February 2021 07:21:52 UTC