[csswg-drafts] [css-writing-modes] Confused about 'writing-mode' with 'direction' (#3504)

RazrFalcon has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-writing-modes] Confused about 'writing-mode' with 'direction'  ==
Moved from https://github.com/w3c/svgwg/issues/618

https://www.w3.org/TR/SVG/text.html#WritingModeProperty
https://www.w3.org/TR/SVG/text.html#DirectionProperty

Afaiu, `writing-mode` was completely changed in SVG 2, but I think that the problem should persist. I'm not sure if there are any SVG 2 ready applications, so I cannot test this. That's why the example below is SVG 1.1 based.

```xml
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" font-family="Arial" font-size="64">
    <path id="crosshair" d="M 20 100 L 180 100 M 100 20 L 100 180" stroke="gray" stroke-width="0.5"/>
    <text id="text1" x="100" y="150" writing-mode="tb" direction="rtl">Text</text>
    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>
```

![a-direction-001](https://user-images.githubusercontent.com/725494/50242496-3f825680-03d3-11e9-9cc8-6a20ddc26e52.png)

As you can see, the results are pretty different. Which one is the correct one and why?

PS: is the SVG 1.1, the `writing-mode` property could have 6 different values. But according to the SVG 2 spec, there are actually only two of them: left-to-right and top-to-bottom. So in the SVG 1.1 I can treat `lr-tb`, `rl` and `rl-tb` as `lr` and `tb-rl` as `tb` and it should not technically affect anything?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3504 using your GitHub account

Received on Saturday, 12 January 2019 16:36:17 UTC