Open Bug 1224997 Opened 4 years ago Updated Last year

Ruby may overlap the border if the whole line-height is enough but a single side is not


(Core :: Layout: Ruby, defect)

Not set




(Reporter: xidorn, Unassigned)


(Blocks 1 open bug)


(Keywords: parity-chrome, parity-edge, parity-safari)

For example, if we have
<div style="line-height: 1.8; border: 1px solid black;"><ruby>何<rt>なん</rt></ruby></div>

The line height is enough to put ruby between lines, but it is not enough for the first line, which causes overlap.

Although our current behavior conforms to the spec, but doesn't match what other browsers do. We probably should fix this to provide a more sensible default behavior.

However, the exact behavior is different between Blink/WebKit and Edge: Blink/WebKit collapses the added leading with the padding of the block, while Edge does not.
This is how it's supposed to work.  Publishers in Japan complained about the poor line-spacing behavior in other browsers, so the spec chose a different behavior.  It's not clear to me how you'd fix this without breaking the line-spacing behavior, since line-spacing needs to be consistent across blocks.
Oh, okay, I was not aware of that publichers in Japan complained about the behavior of other browsers.

I was going to ensure that the leading at the start side is always large enough for the first line, and the leading at end side is always enough for the last line. This should match Edge's behavior, although I thought Blink's behavior looks more sensible.

If that behavior is not desirable, we may close this bug as WONTFIX.
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-edge][parity-blink][parity-webkit]
Component: Layout: Block and Inline → Layout: Ruby
You need to log in before you can comment on or make changes to this bug.