Re: [css-ruby] how to specify offset of ruby annotation box from ruby base box?

On Sat, Feb 7, 2015 at 12:25 PM, fantasai <fantasai.lists@inkedblade.net>
wrote:

> On 10/02/2014 01:39 PM, Glenn Adams wrote:
>
>> Is there an expected/intended way to express an offset between a ruby
>> annotation box and its associated ruby base box in the
>> block progression dimension?
>>
>> I see that Antenna House defines an '-ah-ruby-offset' property [1] for
>> this purpose.
>>
>> [1] http://antennahouse.com/xslfo/ruby-extension.htm#axf.ruby-offset
>>
>
> I think there are several possibilities under consideration:
>
>   A. use line-height property on annotations (probably not the best idea)
>   B. use margins/padding on annotations and/or bases
>   C. use a specialized offset property
>
> I'm not sure where we are in this discussion. The vertical layout model
> is not fully specified yet.


Option A is always available. The option C I guess we don't actually need
any "specialized" property. We can directly use "position: relative" with
an offset. The only difference is that relative-positioning won't add the
additional leadings. But it seems to me that the spec doesn't want authors
to rely a lot on that auto-added leadings, so I assume this would not be a
problem.

For the option B, currently Gecko suppresses all padding (as well as
border) on rbc and rtc. And since we treat all ruby boxes mostly as inline
elements, the margins in block direction are ignored as well. If you want,
though, I don't think it would be a big issue to require the UA to support
block direction margins on ruby text containers. But how this would affect
the calculation of leadings, and whether the margins can collapse, should
be clearly described in the spec.

- Xidorn

Received on Saturday, 7 February 2015 12:45:48 UTC