Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amire80 opened this issue Dec 25, 2017 · 3 comments
Assignees
Labels
css-text-3 Current Work Tested Memory aid - issue has WPT tests Tracked in DoC

Comments

@amire80
Copy link

amire80 commented Dec 25, 2017

Consider the following code:

<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

@amire80 amire80 changed the title [css-text] Make ::first-letter: { text-transform: capitalize } a no-op for text in languages that don't have letter case [css-text] Make ::first-letter { text-transform: capitalize } a no-op for text in languages that don't have letter case Dec 25, 2017
@amire80
Copy link
Author

amire80 commented Dec 25, 2017

I also reported these related issues:

Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1427032

Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=797571

@fantasai
Copy link
Collaborator

fantasai commented Jan 7, 2018

Thanks for reporting the bugs. As for the spec, it is already specified here: https://www.w3.org/TR/css-text-3/#boundary-shaping

@fantasai fantasai added the css-text-3 Current Work label Jan 7, 2018
@litherum
Copy link
Contributor

litherum commented Jan 8, 2018

The spec says "Text shaping must not be broken across inline box boundaries when there is no change in formatting." so it seems to me this is just a browser bug and not a spec bug.

@frivoal frivoal self-assigned this Oct 3, 2018
frivoal added a commit to frivoal/wpt that referenced this issue Oct 5, 2018
frivoal added a commit to frivoal/wpt that referenced this issue Oct 9, 2018
frivoal added a commit to frivoal/wpt that referenced this issue Dec 26, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 5, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 6, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 7, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 8, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385
@frivoal frivoal added the Tested Memory aid - issue has WPT tests label Apr 25, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: da69f9ccccc0a3e7c4dfc836c6d8ec7a554bc68a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: 791c347d66c2a8ddab9261abeb63aa31239fbcac
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: da69f9ccccc0a3e7c4dfc836c6d8ec7a554bc68a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: 791c347d66c2a8ddab9261abeb63aa31239fbcac
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: da69f9ccccc0a3e7c4dfc836c6d8ec7a554bc68a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385

UltraBlame original commit: 791c347d66c2a8ddab9261abeb63aa31239fbcac
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this issue May 1, 2025
…rb shaping in arabic, a=testonly

Automatic update from web-platform-tests
[css-text] text-transform must not disturb shaping in arabic

Related to w3c/csswg-drafts#2135

--
Merge pull request #13385 from frivoal/text-2135

[css-text] text-transform must not disturb shaping in arabic
--

wpt-commits: a1e342c18c90f8386adf9e23495814ed6e7f2804, 9b22a2f64e0199794898ae88bf29ae558e2a2f5a
wpt-pr: 13385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-text-3 Current Work Tested Memory aid - issue has WPT tests Tracked in DoC
Projects
None yet
Development

No branches or pull requests

4 participants