w3c / w3c/csswg-drafts

[css-text-4] text-spacing-trim and classes of closing punctuation

Open
#9,504 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-text-4 i18n-clreq i18n-jlreq i18n-tracker
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

In css-text-4 8.5.1. Fullwidth Punctuation Collapsing, we have:

Set fullwidth closing punctuation half-width if the next character is any of:

  • a fullwidth closing punctuation
  • a fullwidth middle dot punctuation
  • an ideographic space (U+3000)
  • a fullwidth opening punctuation of a larger font-size
  • a character belonging to Unicode general category Pe

I think we should we add Pf alongside with Pe.

These WPT tests assume it, and that seems very reasonable to me:
https://wpt.fyi/results/css/css-text/text-spacing-trim?label=master&label=experimental&aligned&q=text-spacing-trim-quote-001.html

Further, thoes tests makes it conditional on the language, collapsing when it's Japanese, but not when it's Chinese. If we were to do spec that language dependency, it should be for more than just Pf, but also Pe and Ps (in the previous rule). Or maybe we don't need the language dependency, and the variants of those glyphs that can or cannot be trimmed can be detected from the font?

cc: @fantasai @kojiishi

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

Read css-text-4 §8.5.1, “Fullwidth Punctuation Collapsing,” and inspect the linked WPT text-spacing-trim tests, especially text-spacing-trim-quote-001.html. Resolve whether Pf should be added, how Pe/Ps/Pf behavior depends on language, and whether font-specific variants affect the rule; done means the specification and corresponding tests agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.