Re: [css-ruby] About default style sheet

Sorry for a late reply.

On Thu, Dec 11, 2014 at 5:22 PM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> Ping?
>
> On Tue, Dec 2, 2014 at 10:49 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
>>
>> In my opinion, there are currently two problems in the current default
>> style sheet: one is the font size of text directly contained by <rtc>, the
>> other is the line-height, which I mentioned in another thread before.
>>
>> Since we have changed the spec, and there are use cases where author may
>> have text inside <rtc> directly, this tag should also have 50% font-size, or
>> it would be strange when authors try to use span. Considering that <rt> may
>> be contained inside <rtc>, I propose that this part should be changed to:
>>
>> rt, rtc { font-size: 50%; }
>> rtc > rt { font-size: inherit; }

That makes sense, fixed.

>> Then line-height. As in the spec, we encourage authors to specify
>> sufficient line-height to put annotations, the line-height of <ruby> should
>> not be "normal" in most cases. But line-height is a property which inherits
>> by default, which means ruby annotations will inherit the large line-height
>> from its parent (ruby container). This must not be what authors expect. I
>> suggest that we break the inheritance for annotations in the default style
>> sheet, hence:
>>
>> rt, rtc { line-height: normal; }
>>
>> or maybe 1em. I'm not sure about what value is better in practice, but
>> anyway it should not inherit.

I can't imagine any use cases of using leadings for ruby text, so that
makes sense to me too. However, I'm not sure whether it should be done
through the default stylesheet or by code. The second paragraph of the
section 3. Ruby Layout[1] says:

| Each ruby annotation container is sized and positioned to contain
| exactly the full height of its ruby annotations.

so leadings should be ignored IIUC. I confirmed that WebKit ignores
line-height of rt, so if you want to achieve the same effect in the
default stylesheet than the code, probably:

rt, rtc { line-height: 1 !important; }

Not sure if there were any cases where having this in the default
stylesheet differs from what the spec says.

[1] http://dev.w3.org/csswg/css-ruby/#ruby-layout

/koji

Received on Sunday, 14 December 2014 14:16:47 UTC