Skip to content

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

Closed
@frivoal

Description

@frivoal

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, 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).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions