[csswg-drafts] [css-ruby] Applicability and effect of margin / border / padding on ruby containers (#4976)

frivoal has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ruby] Applicability and effect of margin / border / padding on ruby containers ==
Whether margin / border / padding affect ruby container boxes, and if so how, is not defined. They are generally assumed to be similar to inline boxes in many ways, but they're not actually inline boxes, and since they have internal structure, things may need to be defined.

In Chrome / safari, they apply, and have the same effect as on inline boxes. They affect painting, and they affect layout in the inline direction but not in the block direction.

In Firefox, they also apply, but have a subtly different effect. They also affect painting, and also affect layout in the inline direction, but unlike chrome/safari, there is an effect on layout in the block direction as well: a positive `padding-top` or `border-top-width` if ruby-position is over, or a positive `padding-bottom` or `border-bottom-width` if ruby-position is under will reduce the additional leading added by [section 3.5](https://drafts.csswg.org/css-ruby-1/), until that additional leading is reduced to 0. If border+padding is larger than the additional leading, there is no further effect.

I suspect this effect is not intentional, and that block-axis margins / borders / padding on a ruby container should be specified to have no effect on layout.

The effects of margin/border/padding in the inline direction seem reasonable, interoperable, and uncomplicated. So I think we should spec that they do work.

From there, it would make sense that the effects on painting be kept as well (and they're interoperable).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4976 using your GitHub account

Received on Monday, 20 April 2020 09:00:28 UTC