Re: [css-ruby][css-writing-modes] The writing-mode property on ruby internal boxes

On Thu, Jul 16, 2015 at 8:15 PM, Koji Ishii <kojiishi@gmail.com> wrote:

>
> On Thu, Jul 16, 2015 at 4:14 PM, Xidorn Quan <quanxunzhen@gmail.com>
> wrote:
>
>>
>> The computed values, same as what the current spec does on ruby-position:
>> inter-character. I don't think it makes sense to have different value for
>> computed one and effective one here.
>>
>
> inter-character wants to force a different value than parent's to its
> descendants, but this case you want to ignore, no?
>
> The writing-mode property already ignores certain elements[1]:
>
> | Applies to: All elements except table row groups, table column groups,
> table rows, and table columns
>
> so I guess these are more similar to table rows etc. than to
> inter-character.
>
> Now I'm not sure, when the spec says "Applies to" only certain elements,
> whether it's computed values, used values, or effective values, but since
> writing-mode values from tables inherits to table cells, I guess it's used
> value.
>

According to CSS 2.1 spec, when a property does not apply to an element,
this property won't affect the rendering effect of the element [1], but the
computed value still exists [2]. I guess it means that, the used value does
not exist in that case.

Then I changed my mind. Similar to table cases, we should exclude ruby base
container and ruby text container from "Applies to" of "writing-mode", but
still allow that property to be applied on ruby base box and ruby text box,
so their content is allowed to be orthogonal to the line (probably with an
anonymous inline-block inside instead of making those boxes themselves
orthogonal).

About "ruby-position", I give up my proposed change to make it always force
the writing-mode. But we indeed need some change to the rule for
inter-character (though it is unrelated to my proposal here).

Since the anonymous box generation step happens after style computation
stage (as we need to know at least the display type of both parent and
children anyway), and both <rt> and <rtc> can be an anonymous box, it will
need some hack. My idea is:
Compute the "writing-mode" of an element to "vertical-rl" if
1) the display type is "ruby-text" and its parent has "ruby-position:
inter-character", or
2) the display type is "ruby-text-container" and the element itself has
"ruby-position: inter-character".
Note that, the computed value for ruby-text-container is not applied to the
container itself, but for being inherited by its non-pseudo children.

[1] http://www.w3.org/TR/CSS21/about.html#applies-to
[2] http://www.w3.org/TR/CSS21/cascade.html#computed-value

- Xidorn

Received on Friday, 17 July 2015 02:39:45 UTC