w3c / w3c/csswg-drafts

[css-writing-modes] Support vertical CJK + ttb Arabic (rtl scripts generally)

Open
#3,608 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-writing-modes-5 i18n-alreq i18n-clreq i18n-jlreq i18n-mlreq i18n-tracker
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

In Issue 2754 I proposed a new value horizontal-tb-rl to writing-mode.

Now I would like to bring up an improved proposal to replace the older one:

Instead of adding a new value horizontal-tb-rl to writing-mode, it would be better to add a new property cjk-dir.

Let's think about vertical CJK text together with LTR text. It is reasonably rendered in a consecutiveness way, because vertical CJK characters are "by default" mapped as Top-Left/Bottom-Right in vertical mode:

cjk-dir3

But when it comes to displaying vertical CJK together with RTL text, such as Persian, it is not as readably rendered as with LTR Latin text, because CJK and Persian text are rendered bi-directionally:

cjk-dir1

However, in vertical mode, it shouldn't have had to be in that way, bacause CJK characters can be mapped Top-Right/Bottom-Left as well as Top-Left/Bottom-Right. So here comes the new property cjk-dir, it changes the CJK characters' default directionality(remap them as Top-Right/Bottom-Left), without any necessary rendering change for CJK characters themselves:

cjk-dir2

The image above shows the vertical text with cjk-dir: ltr on the left, and shows the other one with cjk-dir: rtl on the right(being obviously more readable than the left bidi one).

cjk-dir can also as perfectly slove Issue 2754, which was about RTL CJK in horizontal mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Issue 2754 and the discussion here, then compare the proposed cjk-dir property with the described vertical CJK and RTL rendering cases. The issue does not name implementation files or tests; done would require a settled CSS Working Group direction and corresponding specification work.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.