[csswg-drafts] [css-text] Make ::first-letter: { text-transform: capitalize } a no-op for text in languages that don't have letter case

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

== [css-text] Make ::first-letter: { text-transform: capitalize } a no-op for text in languages that don't have letter case ==
Consider the following code:
```html
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>first-letter issue demo</title>
  <style type="text/css">
    .cap::first-letter {
      text-transform: capitalize;
    }
  </style>
</head>

<body>
<div dir="rtl" lang="ar">
<p dir="ltr" lang="en">Incorrect, with capitalize:</p>
<p class="cap">عائلة</p>
<p dir="ltr" lang="en">Correct, without capitalize:</p>
<p>عائلة</p>
</div>
</body>
</html>
```

In the latest versions of Firefox and Chrome the rendering of the Arabic text in the section marked as "incorrect" is broken: the first letter is disconnected from the rest of the word. I guess that the rendering engines try to apply separate styling to the first letter and disconnect it, which is unnecessary because capitalization cannot work anyway.

While "first-letter" may have some useful meaning in all writing systems, "capitalize" is meaningless in writing systems that don't have letter case. Applying these rules to text in these writing systems should do nothing. I'm not sure how exactly this is supposed to be written, but this should be defined explicitly as a no-operation on the standards level.

The relevant standards section is probably 
https://www.w3.org/TR/css-text-3/#text-transform-property

See the related discussion at https://lists.w3.org/Archives/Public/www-international/2017OctDec/0142.html

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

Received on Monday, 25 December 2017 09:03:52 UTC