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

> On 07 Jul 2015, at 08:48, John Daggett <jdaggett@mozilla.com> wrote:
> 
> Reading through Koji and Florian's messages, they appear to be agreeing
> with fantasai's proposed revision:

Correct.
> > 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:


> This is super confusing for authors I think. You're effectively making
> 'writing-mode' a pseudo-shorthand because it will need to override
> 'text-orientation' values, but only sometimes (i.e. the sideways-xxx
> cases).

This is not a shorthand, this is just about when the text-orientation property applies or not. There are multiple examples of properties that apply in some cases and not other in all over CSS. overflow is not considered a shorthand of resize just because resize only applies when overflow is something else than visible. Just the same, there is not reason to consider writing modes a shorthand of text-orientation just because text-orientation only applies in some writing modes. More over, the behavior you get with writing-mode:sideways-left is something you could not achieve with (the redesigned version of) text-orientation.

Moreover, this behavior of having text-orientation only apply in some writing-modes is already the the case in the current spec. writing-mode:horizontal already ignores the text-orientation values.
This only proposing to extend this to the other modes that horizontal script authors use when they want sideways captions. In these modes, there is not question about where the baseline should go, or what the glyph orientation should be. There is only one correct answer, so you switch a single property and you get it.

This is much less confusing that the current situation, where authors who have never thought of the possibility that glyph orientation could be determined by something else than the line orientation itself are required to set the text-orientation property away from its default to 'sideways'. For western authors, text-orientation:sideways just becomes a magic incantation that means "do what I've already asked for", and breaks your page if you forget it.

> You're introducing all sorts of odd combinations:
> 
>   writing-mode: sideways-rl;
>   text-orientation: mixed; /* it's not really mixed anymore? */

text-orientation is does not apply in this writing mode, so it is no more a confusing combination than writing-mode:horizontal;text-orientation:mixed.

>   writing-mode: sideways-lr;
>   text-orientation: upright; /* one of the values has to take precedence */

text-orientation does not apply in this writing mode, so you get what you asked for: sideways-lr.

> The most common use case for vertical text is CJK authoring. For that
> authors really only need to use 'writing-mode', since the default value
> of text-orientation will work most of the time:
> 
>   /* text-orientation defaults to mixed so doesn't need to be set */
>   writing-mode: vertical-rl;

Under fantasai's new proposal, this is still true.

> Only when overriding the default orientation does a CJK author need to
> worry about setting 'text-orientation' explicitly.

Still true.

But under the old proposal, non-CJK authors wanting vertical text (for captions) always need to set the text-orientation to sideways. Under the new one, they don't.

> I feel strongly that the complexity of other use cases, vertical
> captions, vertical RTL or Ogham should be handled by 'text-orientation'
> values. I also think dealing with these use cases should be the subject
> of a next-level spec, not this one. We need to achieve simple interop
> for the common CJK case first.


Modulo potential bikeshedding, dropping text-orientation: sideways-left and not introducing the sideways-* writing modes gives you something that is the strict intersection of the current spec and fantasai's proposal, and it supports CJK/M layout just fine.

If we're fine with not supporting the horizontal scripts in vertical captions use cases in level 1, I am happy to go with this subset for now, since both proposals share it.

But if we want to support these use cases, the current spec forces us to support  downwards RTL in vertical, while fantasai's proposal allows us to support the former without the later. Given that there is pretty much no use case for the later, and that fantasai's proposal is indentical for CJK authors and easier to use for horizontal-script authors, I think it is a better way forward.

 - Florian

Received on Tuesday, 7 July 2015 10:20:37 UTC