Re: [csswg-drafts] [css-writing-modes] Add a new value `horizontal-tb-rl` to `writing-mode`

![](https://cloud.githubusercontent.com/assets/4839211/23313401/719d73f8-fab5-11e6-9c8f-8acde6b552d8.jpg)

This Taiwanese newspaper contains various items in RTL Chinese, and not only headings – see the caption under the photo.

Note also that it's actually bidirectional text: eg. the 8.6% flows LTR within the RTL flow, just as in Arabic/Hebrew/etc. 

The normally recommended approach for this is indeed to use an override. However, take the case of 8.6%受訪者没頭路: since the text should be always stored in logical order (so that a machine knows this is 8.6%, not 6.8%, and can read the word 'respondents' 受訪者), it's important to not reorder the digits or the text in memory. For that reason, you need to apply directionality separately to the number and the text.  In HTML the best way to do this is probably via markup such as the following:

```
<h2><bdo dir="rtl"><bdo dir="ltr">8.6%</bdo>受訪者没頭路</bdo></h2>
```

Note also that the one-character per column approach is really not at all helpful when dealing with the caption.  One might try to argue that there is some column related semantics in the case of simple headings, since they span vertical-rl text, but actually there are plenty of examples of RTL chinese and (pre-1945) japanese in contexts that have nothing to do with vertical text.

If we were to develop some new property/value for this, i'm thinking it would be better to have something that resets the default direction at the character level to RTL for han, kana, and other defined sets of characters. Then we'd have a situation where `bdo` wasn't necessary, and where alignment of the text could also be determined automatically (whereas for these examples you'd need to explicitly right-align the lines).  Such an approach would also be useful for other scripts, such as Tifinagh, Egyptian Hieroglyphs, Runes, etc. which are also LTR characters by default, but sometimes are assembled in RTL lines.




-- 
GitHub Notification of comment by r12a
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2754#issuecomment-396234698 using your GitHub account

Received on Monday, 11 June 2018 12:59:53 UTC