Re: [csswg-drafts] [css-writing-modes] `unicode-bidi: plaintext` not affect ul/ol (#3491)

@frivoal's explanationis entirely correct with his explanation, but he misses one thing: the feature you're looking for exists in HTML. Use `dir=auto`, and it should do what you expect. HTML is able to calculate the direction before CSS runs, so it will be able to give you the results you expect.

In general, we strongly strongly recommend that authors do not use `direction` or `unicode-bidi` directly, and use the `dir` attribute in HTML. I think you should be seeing that advice very clearly laid out in the spec section you're linking, no? :)

I also want to warn you: the automatic determination of 'direction' is a very dumb heuristic. It only looks at the first letter. There is a lot of text content out there that is in an RTL language but begins with an LTR character, such as a number (2018) or an abbreviation (USA) or some other LTR text. This will give you bad results! So you should, if it's at all possible, try to use dir=ltr or dir=rtl explicitly based on the language of your content as you know it, or can guess it from some more sophisticated heuristic. (We use this simple heuristic because it works frequently if not quite reliably, it's straightforward and easy to understand, and it can be easily manipulated using the RLM and LRM characters.)

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

Received on Tuesday, 15 January 2019 03:37:20 UTC