Re: [csswg-drafts] [css-ruby] Ruby offset (#4932)

There is no dedicated ruby property, as offsetting ruby can already be done with margins (or paddings, or even borders):

https://jsbin.com/nunuqey/edit?html,css,output (view in Firefox, other browsers' ruby implementation are insufficient to show this).

[By spec](https://drafts.csswg.org/css-ruby-1/#ruby-layout), the (groups of) annotations are supposed to be stacked immediately against the (groups of) bases, margin-box against margin-box, (which is why margin/border/padding on bases or annotations can be used as offsets).

That said, margin/border/padding are added to the content area, but the content area of inline boxes is currently not defined and is implementation dependent. That part of the box model is know to be weak (see the second note in [css-inline section 3.3.1](https://drafts.csswg.org/css-inline/#leading)), and needs more work. Maybe some switches are needed to control what the content area of an inline is in general, maybe some are needed for ruby specifically, or maybe we just need to agree on what the default is. Either way, that's separate from the need for a ruby offset, which we do have in the form of margins (or paddings, or borders).

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

Received on Friday, 10 April 2020 04:12:59 UTC