csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[css-ruby-1] Default ruby centring for more than just zh

Open r12a opened this issue 8 years ago • 7 comments

A.1 Supporting Ruby Layout https://drafts.csswg.org/css-ruby-1/#default-ua-ruby

the default UA style sheet information includes the following:

rtc:lang(zh), rt:lang(zh) {
  ruby-align: center; }

This establishes centred display for ruby for Chinese, but there are other language subtags that indicate that text is chinese besides the generic zh. These should presumably also be included here.

The current list of more specific tags recommended by the IANA subtag registry rather than zh is: cdo cjy cmn cpx czh czo gan hak hsn lzh mnp nan wuu yue.

r12a avatar Nov 30 '16 18:11 r12a

I don't think it's worth adding them. Web content shouldn't use them.

If we really want to take those tags into consideration, we really need a new mechanism to handle macrolanguages, rather than listing everything inside it.

upsuper avatar Dec 02 '16 03:12 upsuper

My experience is that the language is a lot less important than the script for styling purposes. zh-latn and zh-hans or zh-hant have different styling considerations.

patrickdark avatar Dec 23 '16 16:12 patrickdark

It seems to me we might want to just remove this rule, and rely on controlling the justification opportunities instead. The reason Chinese is centered by default here because its annotations tend to be in Latin (Pinyin) or Bopomofo. But when they are in Hanzi, they are not centered, they are spaced out.

fantasai avatar Feb 02 '21 05:02 fantasai

(For my own reference, filed Gecko bug 1691243 for this change)

upsuper avatar Feb 07 '21 05:02 upsuper

I had another look at the issue, and it seems to me that bopomofo does have justification opportunities inside, so removing ruby-align: center may not work for it. And I think it makes sense for bopomofo to have justification opportunities, as they are like kanas in Japanese that they can mix into a piece of Chinese text, and if such piece of text is justified, bopomofo should behave just like Chinese characters.

But I also agree that when the annotation is Chinese, it seems right to have it spaced out. Not sure how we can solve this conflict.

upsuper avatar Nov 14 '21 03:11 upsuper

(reopening, so that we don't forget to deal with @upsuper's comment)

frivoal avatar Dec 22 '21 09:12 frivoal

CSS will ping I18N when text is written for review by CLREQ

aphillips avatar Sep 13 '22 18:09 aphillips

@upsuper we've now made edits to deal with https://github.com/w3c/csswg-drafts/issues/779#issuecomment-968197327. Feedback appreciated.

frivoal avatar Dec 28 '22 05:12 frivoal

Looks good to me, thanks.

upsuper avatar Dec 28 '22 06:12 upsuper