Re: [css-ruby] About default style sheet

On Mon, Dec 15, 2014 at 1:16 AM, Koji Ishii <kojiishi@gmail.com> wrote:
>
>
> > On Tue, Dec 2, 2014 at 10:49 AM, Xidorn Quan <quanxunzhen@gmail.com>
> wrote:
> >>
> >> 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.
>

WebKit also defines "line-height: normal" in its UA style sheet. Defining
this would make sense if there are inline-block inside the annotation. I'd
prefer not make rtc ignore the leadings, but use only style to control. It
would give authors more flexibility with reasonable default behavior. Also,
I don't think we need "!important" here.

- Xidorn

Received on Sunday, 14 December 2014 21:38:15 UTC