Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
r12a opened this issue Nov 30, 2016 · 9 comments
Closed

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

r12a opened this issue Nov 30, 2016 · 9 comments
Labels
Closed Accepted by CSSWG Resolution css-ruby-1 Current Work i18n-clreq Chinese language enablement i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Needs Testcase (WPT)

Comments

@r12a
Copy link
Contributor

r12a commented Nov 30, 2016

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 r12a added css-ruby-1 Current Work i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. labels Nov 30, 2016
@upsuper
Copy link
Member

upsuper commented Dec 2, 2016

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.

@r12a r12a added i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. and removed i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. labels Dec 8, 2016
@patrickdark
Copy link
Contributor

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.

@r12a r12a added the i18n-clreq Chinese language enablement label Apr 30, 2018
@fantasai
Copy link
Collaborator

fantasai commented Feb 2, 2021

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.

@upsuper
Copy link
Member

upsuper commented Feb 7, 2021

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

@upsuper
Copy link
Member

upsuper commented Nov 14, 2021

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.

@frivoal
Copy link
Collaborator

frivoal commented Dec 22, 2021

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

@aphillips
Copy link
Contributor

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

@frivoal
Copy link
Collaborator

frivoal commented Dec 28, 2022

@upsuper we've now made edits to deal with #779 (comment). Feedback appreciated.

@frivoal frivoal closed this as completed Dec 28, 2022
@upsuper
Copy link
Member

upsuper commented Dec 28, 2022

Looks good to me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution css-ruby-1 Current Work i18n-clreq Chinese language enablement i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Needs Testcase (WPT)
Projects
None yet
Development

No branches or pull requests

6 participants