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-display] Inlinified 'block ruby' should generate an inline-block wrapper #1700

Closed
Loirooriol opened this issue Aug 6, 2017 · 2 comments

Comments

@Loirooriol
Copy link
Contributor

When a block flow element is inlinified, it becomes inline flow-root (i.e. inline-block) in order to preserve the block container.

Shouldn't the same happen for block ruby? If you request your ruby container to be wrapped inside a principal block container (e.g. because you want to use width or height), shouldn't the block container be preserved (in the form of as inline-block) in case the element is unexpectedly inlinified by some ancestor?

I think so. There should be a ruby-root inner display type and, just like flow becomes flow-root during inlinification, ruby should become ruby-root.

@fantasai
Copy link
Collaborator

I don't think there's a use case for this, and letting block ruby convert to inline ruby is fine. If you want it to be atomic, you probably should be using flexbox, not the inline formatting model.

@Loirooriol
Copy link
Contributor Author

Loirooriol commented Mar 19, 2018

@fantasai More than flexbox I guess I should separate the block ruby element into a parent with display: block and a child with display: ruby. But I don't like adding elements just for styling purposes. This could be an use-case for ::contents, though.

.block-ruby { display: block }
.block-ruby::contents { display: ruby }

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