Re: [csswg-drafts] [css-ruby] Be more specific about the box model of base/annotation container boxes (#4937)

> Firefox ignores the block-axis margin / border / padding of base container boxes and annotation container boxes when it comes to stacking them (and for all other purposes as well as far as I can tell, but I was only testing the stacking).

For border and padding, yes. Actually for convenience it's done one step further that `border` and `padding` are all computed to zero for ruby base / annotation containers.

But I think this should be kept as implementation details for now, and shouldn't be specified. And my feeling is that it makes more sense to say that they should be stacked based on border box (or even margin box) instead. One argument against using margin box IIRC is that inline elements are not supposed to have margin on block direction, though.

> but curiously, it does not ignore the margin on base container boxes. I suspect that's an accident,

That doesn't match my read of the [code](https://searchfox.org/mozilla-central/rev/9120151ddb35f2d4c37bfe613a54a4f10a9a3dc5/layout/generic/nsRubyFrame.cpp#267-282), the [discussion(https://bugzilla.mozilla.org/show_bug.cgi?id=1055667#c6) on the implementing ticket, as well as my testing.

Could you provide your test code for this?

However... during testing I noticed that Firefox does respect the block margins on ruby base box and ruby text box, which doesn't seem to be consistent with the idea that block margins are ignored on inline elements. I think this is a [recent](https://bugzilla.mozilla.org/show_bug.cgi?id=1565681) regression...

But I think that also raise a question on what does margin box really means for ruby base box and ruby text box. They otherwise behave like inline element, so should their block margin counts in their margin box?

-- 
GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4937#issuecomment-611919410 using your GitHub account

Received on Friday, 10 April 2020 07:39:05 UTC