Skip to content

[css-ruby][css-display] Are ruby containers atomic? Specs contradict #1180

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
Loirooriol opened this issue Apr 6, 2017 · 3 comments
Closed

Comments

@Loirooriol
Copy link
Contributor

CSS Display defines atomic inline as

An inline-level box that is replaced or that establishes a new formatting context

An element with display: ruby has the inline outer display role, so

The element generates an inline-level box.

, and has the ruby inner display layout model, so

The element generates a principal ruby container box, and establishes a ruby formatting context.

Therefore, display: ruby should produce an atomic inline box according to CSS Display.

However, CSS Ruby explicitly says otherwise:

Ruby containers are non-atomic inline-level boxes.

@SelenIT
Copy link
Collaborator

SelenIT commented Apr 7, 2017

Yes, the ruby formatting context appears to be an exception from the general rule that the inline-level box that establishes a new formatting context is usually atomic. Ruby containers can break between lines, so they are definitely non-atomic.

I suppose that the CSS Display spec should be changed to something like

An inline-level box that is replaced or that establishes a new block, flexbox, grid, or table formatting context

An inline-level element can't establish the inline formatting context, and establishing ruby formatting context doesn't make an inline-level box atomic. If new formatting contexts that make inline-level boxes atomic appear in the future, they should be explicitly added to that list.

@fantasai
Copy link
Collaborator

fantasai commented Apr 7, 2017

Ruby containers are weird... they establish a new ruby formatting context, but their content also participates in their parent's inline formatting context. That's going to be odd to explain. :) I'd rather call out ruby as an exception than list out the things that aren't exceptional though.

@fantasai
Copy link
Collaborator

fantasai commented Apr 7, 2017

Okay, this should be fixed now. Let me know if you have an further improvements to suggest on this point.

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

3 participants