Re: [css-writing-modes] Propose writing-mode: sideways-left

On 06/02/2015 03:00 PM, Koji Ishii wrote:
> I'd like to propose:
>
>    writing-mode: sideways-left
>
> which is equivalent to setting the two properties:
>    writing-mode: vertical-lr;
>    text-orientation: sideways-left;
>
> When this value is specified, I prefer to make the used value of
> text-orientation to sideways-right, but I'm good not to if this is
> controversial.
>
> Although equivalent, this proposal has following benefits.
>
> 1. Resolves dbaron's open issue where logical directions change within a BFC[1].
>
> 2. Resolves my concern of sideways-left being an inline property value
> at Sydney F2F[2]. IIUC jdagett expressed the same concern before.
>
> 3. This proposal is inline with fantasai saying "we could make it
> apply to blocks only" to resolve #2[2].
>
> 3. Resolves the issue where a non-at-risk value (sideways) has a
> dependency on an at-risk value.
>
> 4. Eliminates a combination "vertical-rl + sideways-left" that has no
> use cases and thus helps testing.

There are 3 use cases for sideways-left:

   1) Counter-clockwise-rotated blocks of horizontal-script text
   2) Top-to-bottom orientation of RTL runs in vertical text
   3) Ogham

Use case #1 is very important imho to this spec. And triggering a
new block formatting context does not interfere with this use case.

Use case #2 is rare, but requires inline orientation support.

Use case #3 is even more rare, and in most cases is handled as
case #1. In theory it could also end up as adjunct to case #2,
but this would be extremely unusual.

My objection to moving 'sideways-left' from 'text-orientation'
to 'writing-mode' is that, for case #1, the behavior and API
of clockwise rotation and counter-clockwise rotation must be
symmetric. For horizontal script users, there is no fundamental
difference between rotating 90deg clockwise or rotating 90deg
counter-clockwise, and thus to have them be different in CSS
is confusing and unhelpful.

Thinking about this some more, though, I think what we can do
is move *both* orientations into the writing-mode, like this:

   writing-mode: horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr;
   text-orientation: mixed | upright | sideways (or sideways-rl)

This preserves symmetry, and actually makes it even easier for
horizontal-script authors to get the two most common behaviors.
They no longer need to use 'text-orientation' unless they want,
specifically, upright text. So we have these cases then:

Vertical Script Use Cases:

   Chinese, Japanese, Korean
     writing-mode: vertical-rl;
     + text-orientation: sideways | upright for inline tweaking
   Mongolian
     writing-mode: vertical-lr;
     + text-orientation: sideways | upright for inline tweaking

Horizontal Script Use Cases:

   Clockwise
     writing-mode: sideways-rl;
   Counter-clockwise
     writing-mode: sideways-lr;
   Upright LTR
     writing-mode: vertical-lr;
     text-orientation: upright;
   Upright RTL
     writing-mode: vertical-rl;
     text-orientation: upright;

   * We would probably disable the 'svrt' feature for the sideways
     writing modes, only enable it for vertical writing modes with
     sideways text orientation.

   * Whether -rl or -lr is used depends sometimes on 'direction'
     but most often on the layout context, e.g. right side or
     left side of the page.

Unsolved Use Cases:

   RTL top-to-bottom inline with CJK (rare, but does happen)
   Ogham inline with CJK (very weird case, probably OK to not solve)

I think it's OK for these last two cases to remain unsolved.
The first one would be nice to have, but isn't critical for
anyone, and the last case is mostly theoretical I think.

~fantasai

Received on Saturday, 4 July 2015 18:21:37 UTC