[go: nahoru, domu]

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] Does line-height have an effect on any of the ruby boxes? #4979

Closed
frivoal opened this issue Apr 21, 2020 · 1 comment
Closed
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ruby-1 Current Work Needs Testcase (WPT)

Comments

@frivoal
Copy link
Collaborator
frivoal commented Apr 21, 2020

Section 3.5 of the css-ruby spec talks about the effect line-height on a ruby container has on the line in which it is. That makes sense, and that should stay.

The same implies, without really saying so, that line-height on the ruby container has no effects on the inside layout of the ruby container. I think we should define it to have no such effect.

Also, no other part of the spec talks about the applicability of line-height onto any of the internal ruby boxes (ruby bases, ruby annotations, ruby base containers, ruby annotation containers). I think we should define it not to apply.

Reasoning for line-height having no effects on anything inside the ruby layout:

  • The various kinds of ruby boxes are to varying degrees analogous to inline boxes, and line-height has no effect on the inside of an inline box (only on the size of the line around it, which is why it's also kept as having an effect on the outside of ruby containers).
  • It's simpler
  • It's not necessary
  • That's the way Firefox implements it
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed line height on ruby boxes, and agreed to the following:

  • RESOLVED: line-height on the ruby container doesn't affect the boxes inside
  • RESOLVED: ruby containers, ruby bases and ruby base containers act like inline boxes, we'll use line-height as an example and call out exceptions in the spec
  • RESOLVED: line-height doesn't apply to annotations or annotation containers
The full IRC log of that discussion <emilio> topic: line height on ruby boxes
<emilio> github: https://github.com//issues/4979
<emilio> florian: spec should say whether line-height applies to the inside of the ruby when applied to the ruby container box
<emilio> florian: and whether it applies to the inside ruby boxes
<fantasai> sgtm
<emilio> florian: I think we should define it to _not_ do anything on those
<emilio> florian: seems to be what FF does
<emilio> florian: and I don't think there's a strong use case for it
<emilio> xidorn: I'm slightly surprised
<emilio> xidorn: I think in FF if you apply the line-height to the ruby base it would apply
<emilio> florian: may have mistested
<emilio> florian: do we agree that line-height on the ruby container does nothing to its inside?
<emilio> fantasai: so it doesn't affect the contents but affects the line, right?
<emilio> florian: yes
<emilio> fantasai: I think anything else would be weird
<dbaron> I think this all sounds fine.
<emilio> RESOLVED: line-height on the ruby container doesn't affect the boxes inside
<emilio> florian: now about ruby-base
<emilio> florian: I think there's two things that are reasonable and one that doesn't
<emilio> florian: does nothing would be ok
<emilio> florian: affects the line is ok
<emilio> xidorn: I think in FF it only applies to the line if you set it on the base and container
<emilio> florian: that seems fine
<emilio> astearns: can we test this and confirm?
<emilio> fantasai: there's a first question which is, does it have an effect on ruby annotations / ruby annotation containers?
<fantasai> s/first/another/
<emilio> florian: just tested above and setting line-height on the ruby base does affect the line
<emilio> myles: doesn't this resolution cause the height to double up?
<emilio> xidorn: it wouldn't it's just as if you'd set it on a span in block layout
<emilio> fantasai: I think making them behave like inlines to the extent possible is reasonable
<emilio> myles: line-height on a span is not the same as doing it in the block
<emilio> florian: yeah, this needs phrasing on the spec to match what inlines do
<myles> s/line-height on a span is not the same as doing it in the block/using the maximum value of two nested elements is not exactly the same as how <span> interact with line-height/
<emilio> astearns: is there any other property that we should include in the resolution?
<emilio> fantasai: we shouldn't have a list of properties, we should say that it should behave like inline boxes
<emilio> koji: agree, we should say that ruby boxes are the same as inline boxes, except for some behavior changes. Why do we need to confirm each property separately?
<emilio> florian: the spec was a bit vague in the past, so want to confirm incrementally
<emilio> florian: we can resolve that and save some time
<emilio> fantasai: I think there's value to go through the list, we don't have consensus on how vertical-align behaves and such
<emilio> fantasai: though the spec should be worded generically
<emilio> koji: so we shouldn't put each property that behaves the same in the spec, right?
<emilio> fantasai: right, though we might put some as examples, but we shouldn't build an exclusive list
<emilio> RESOLVED: ruby containers, ruby bases and ruby base containers act like inline boxes, we'll use line-height as an example and call out exceptions in the spec
<emilio> florian: two follow-up questions: for ruby annotations, and their containers, does line-height do anything?
<emilio> florian: I think the answer is no
<emilio> florian: because they're kind of like rows, and line-height doesn't affect layout
<emilio> fantasai: it does, they take up spaces no the line
<emilio> florian: they need to align so there is some kind of line box happening
<emilio> s/florian/fantasai
<emilio> fantasai: so I think we should say it should not apply because you can set line-height and such on the annotation container
<emilio> fantasai: because it's anonymous so the font-size is inherited
<emilio> fantasai: so I think we should say it doesn't apply
<emilio> florian: I disagree with one intermediate point but the conclusion remains true
<emilio> florian: anybody thinks that line-height should apply to annotations / annotation-container?
<emilio> xidorn: I don't see how it can be useful
<emilio> koji: did you test browsers?
<emilio> florian: yes. For chrome is harder to test because the model isn't that close, I don't think it has annotation containers in their current implementation
<emilio> florian: but yes, in FF line-height doesn't do anything
<emilio> koji: ok
<emilio> RESOLVED: line-height doesn't apply to annotations or annotation containers
<fantasai> Here's Xidorn's issue : https://lists.w3.org/Archives/Public/www-style/2015Mar/0181.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ruby-1 Current Work Needs Testcase (WPT)
Projects
None yet
Development

No branches or pull requests

3 participants