Re: [css3-text-layout][svg] writing-mode values across CSS and SVG

On Tuesday 29 June 2010 16:21:51 Sylvain Galineau wrote:
> (Copying Doug as I am not sure whether this is a concern of the FXTF
> or the SVG WG proper)
>
> Currently, CSS3 Text Layout defines the writing-mode property as
> taking:
>
> 	lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr
>
> In SVG1.1, Second Edition [2], writing-mode supports :
>
> 	lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit
>
> 1) In addition to the inherit keyword, SVG adds shorthand values
> for lr-tb (lr), rl-tb (rl) and tb-rl (tb).
>
> 2) SVG also drops bt-rl, tb-lr and bt-lr.

One of the design principles of CSS is to not have aliases, so the fact 
that SVG has both 'lr-tb' and 'lr' is a mistake (no doubt due to the 
fact that SVG progressed faster than CSS). But...

... dropping some values now is probably impossible. Maybe deprecating 
is an option, but that isn't nice either.

Given that the SVG spec is a REC and the CSS one has only been as far as 
CR, it seems more logical that CSS uses SVG's keywords (unless they are 
too illogical or don't fit the style of CSS, but that doesn't seem to 
be the case here).

>
> To make both authors and implementors lives easier - especially in
> mixed documents - both WGs should harmonize the values this property
> supports.

Agreed.

>
> At a minimum, I propose that the CSS3 definition of writing-mode:
[...]
> 	2. Include the shorthand values defined by SVG i.e. lr, rl and tb.

My current preference is:

1) Indeed use all six SVG keywords, because they exist already. (I'd 
have liked to drop 'lr-tb', 'rl-tb' and 'tb'-rl', but it's too late.)

2) Add 'bt-rl'. (Seems necessary for bidi in vertical Japanese.)

3) Add 'tb-lr'. (Mongolian script.)

3) Add a Media Query so that UAs/devices that implement vertical text 
(*-rl and *-lr) must also evaluate '@media (vertical-text)' to true, 
and vice-versa. (The actual keyword is TBD.)

>
> I suspect SVG drops certain direction combinations due to the lack of
> known script for them but those may be useful for other purposes.

I have currently no opinion on the three other combinations:

  - bt-lr - it may be required, I don't know
  - lr-bt - the "XING PED" effect; funny, but probably OK to use images
  - rl-bt - the XING PED effect with bidi?

> [1] http://dev.w3.org/csswg/css3-text-layout/#writing-mode
> [2]
> http://dev.w3.org/SVG/profiles/1.1F2/publish/text.html#WritingModePro
>perty



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 28 July 2010 13:56:06 UTC