-
Notifications
You must be signed in to change notification settings - Fork 672
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
[css-ruby-1] Treatment of multiple Latin words in space-between & space-around #771
Comments
I think Edge's behavior looks better, but I have no idea how that can be speced. |
It's controlled by |
I'm starting to think that this assumption derived from the spec text is incorrect, and that multiple word annotations in Latin text would simply be centred just like single word annotations. My previous assumption arose because of the mention of justification being applied. However, i'm inclined to think that justification is not appropriate if the annotation contains narrow characters (pinyin, english,... ) including spaces – the approach is simply to centre the text. That way, a space would not send two words to opposite sides of the annotation space. Note that Note that Firefox already does this by default if the language of the ruby element is zh-hans/t. I guess it would be helpful to ask the jlreq & clreq folks to confirm the expected behaviour. |
For Chinese, the answer appears to be no justification is expected for multiple word annotations in narrow character text. See w3c/clreq#125 |
I think we might want to specify explicitly that For base text, though, I think it does need to be spaced out if the annotation is really long. |
Yes. This is only about ruby text. |
For JLReq side:
|
…ities in ruby (in a comment). #1907 #771 w3c/jlreq#184
Proposal:
|
I believe |
Seems good to me. Thanks. |
Additional notes from #779:
|
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> Topic: default alignment of ruby text<TabAtkins> github: https://github.com//issues/771#issuecomment-1182339573 <fantasai> https://github.com//issues/779 <TabAtkins> fantasai: ruby text, when you put it on base text, it has different default alignment. latin text and bopomofo is centered, but cjk ruby, if the annotation is smaller than base, it'll be justified <TabAtkins> fantasai: Straightforward way to handle this is to say that ruby annotations are justified by default, and to adjust the jsutification opportunities <TabAtkins> fantasai: In nromal text we allow spaces to stretch, and inter-character for CJK <TabAtkins> fantasai: So if we create a justification method where sapces don't expand, but CJK still does, we'll get the intended behavior <TabAtkins> fantasai: And then people who want a different behavior can use text-justify: inter-word or inter-character if they want it <TabAtkins> fantasai: So proposal is to create this new jsutification mode <TabAtkins> fantasai: One, we could say text-justify:auto on ruby annotation has special behavior, <TabAtkins> fantasai: Two, we could introduce a new text-justify:ruby keyword, and use that in the UA stylesheet <TabAtkins> fantasai: Probably introducing a new keyword is a little more straightforward for impls <TabAtkins> Sounds reasonable to me, but I'm not a text ipmlementor. Also lean slightly toward new keyword. <TabAtkins> florian: I agree <TabAtkins> Rossen_: Can we have a res with a path forward, not open options? <TabAtkins> fantasai: Yes, one or the other <TabAtkins> Rossen_: So proposal to add new text-justify mode as a keyword <TabAtkins> fantasai: Yes, add text-justify:ruby. It disables justification opportunities on spaces and bopomofo, but otherwise is like 'auto' <TabAtkins> RESOLVED: Add text-justify:ruby, which is like 'auto' but disables justification oppo on spaces and bopomofo. <TabAtkins> fantasai: Also need a reoslution to apply it to rt and rtc in UA stylesheet <TabAtkins> Rossen_: Objections? <TabAtkins> RESOLVED: `rt, rtc { text-justify: ruby; }` to UA stylesheet |
@r12a This has now been edited it. Review appreciated. |
https://drafts.csswg.org/css-ruby-1/#valdef-ruby-align-space-between
I think it would be useful to have some text, and perhaps another illustration, showing what would happen if you have more than one word in narrow-cell annotations. For space-between, my assumption is that if you have a two word annotation in Latin script over a longer base, the left edge of the word on the left would be flush with the left edge of the base, and the rightmost character of the other word would be flush with the right edge of the longer item.
The question is what happens between the two words. That could leave a good sized gap in the middle, which is what Firefox does, or cause the browser to stretch the inter-character spacing in order to reduce the gap between the words, which is what Edge does. There is a test for this at:
https://www.w3.org/International/tests/repo/run?base=css-ruby-1&batch=css-ruby&test=ruby-align-property/ruby-align-space-between-104.html
Are either of those correct, or is just one appropriate, or is it specifically undefined? Either way, i think the spec should say something.
The text was updated successfully, but these errors were encountered: