Skip to content
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] Conflicting sentences regarding autohidden ruby annotations #2649

Open
upsuper opened this issue May 7, 2018 · 4 comments
Open

Comments

@upsuper
Copy link
Member

upsuper commented May 7, 2018

(I'm clearing old patches in my local repo, and found there was a bug I opened in Gecko that never gets resolved, and that seems to indicate a spec issue.)

In the section Autohiding Base-identical Annotations, there is a sentence stating:

Hiding a ruby annotation does not affect ... the block-axis positioning of boxes in other levels. However the hidden annotation ... has no impact on layout other than to separate adjacent sequences of ruby annotation boxes within its level, as if they belonged to separate segments and the hidden annotation’s base were not a ruby base but an intervening inline.

It conflicts in the sense that, what if the hidden ruby annotation does contribute to the block-axis positioning of boxes in other levels? i.e. if the one being hidden is particularly tall and it would normally stretch its container? An example like

<ruby>
  <rb></rb><rb></rb><rb></rb><rb></rb>
  <rt></rt><rt style="line-height: 50px;"></rt><rt></rt><rt></rt>
  <rtc>Furigana</rtc>
</ruby>

Should the <rtc> be put 50px away from the base?

It seems to me that the sentence "as if they belonged to separate segments and the hidden annotation’s base were not a ruby base but an intervening inline" is probably great anyway, given that the layout section says:

Ruby annotations within a level (within a single ruby container) are aligned to each other as if they were inline boxes participating in the same inline formatting context.

That sentence sounds like, if there is an autohidden annotation, the annotations before and after should be in two separate inline formatting context, which I believe is not what it means to be.

I guess we can probably allow autohidden annotation to continue contributing to layout, and just say it should behave as if it doesn't have any content.

@upsuper upsuper added the css-ruby-1 Current Work label May 7, 2018
@fantasai
Copy link
Collaborator

fantasai commented Feb 2, 2021

Yeah, definitely see how that conflicts. I think we should just say that the autohidden ruby doesn't affect the alignment of the other annotations exactly as if it was not there and make “as if they belonged to separate segments and the hidden annotation’s base were not a ruby base but an intervening inline” the primary definition.

@fantasai
Copy link
Collaborator

fantasai commented Feb 2, 2021

OK, deleted the phrase “or the block-axis positioning of boxes in other [=levels=]”. @upsuper Let me know if you think this needs any further adjustment?

@upsuper
Copy link
Member Author

upsuper commented Feb 2, 2021

My feeling is that it's easier to say treating the ruby annotation as empty in that case. Since we still have pairing, and there can be multiple levels, implementations still need to keep the ruby annotation itself, it would be more consistent for implementation not to treat it specially.

Saying it as if "belonged to separate segments" and treating hidden annotation's base as "an intervening inline" means the annotation need to be treated as non-existent and the annotations before and after are separated, and they wouldn't impact each other, which is probably not what we want.

@fantasai
Copy link
Collaborator

There's a difference between an empty annotation that's part of the same segment and an intervening inline, though. The difference won't show up in mono ruby, but for jukugo ruby an overly-long neighboring annotation is allowed to share space with an adjacent short annotation. Treating this as a zero-width annotation would allow that long annotation to overlap the entirety of the hidden annotation's base. But for this case, I don't think we want to allow that kind of sharing, I think we want to apply the overhang rules--just as if the base were an adjacent inline.

Having block-axis alignment work across the hidden annotation base would be fine though, if that's what you were concerned about maybe we can specifically talk about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants