Skip to content

Commit 0bc4277

Browse files
committedMar 24, 2025
[css-pseudo-4] Only allow word separators preceding first letter. #9413
1 parent cba50c5 commit 0bc4277

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed
 

‎css-pseudo-4/Overview.bs

+12-8
Original file line numberDiff line numberDiff line change
@@ -421,24 +421,27 @@ First Letters and Associated Punctuation</h4>
421421
<li>
422422
All punctuation--
423423
i.e, characters that belong to the Punctuation (<code>P*</code>) <a>Unicode general category</a> [[!UAX44]]--
424-
that precedes the [=first letter=].
424+
that precedes the [=first letter=],
425+
as well as any intervening typographic space--
426+
characters belonging to the <code>Zs</code> Unicode general category [[!UAX44]]
427+
<em>other than</em>
428+
U+3000 IDEOGRAPHIC SPACE.
425429
<li>
426430
Any punctuation other than opening punctuation and dashes--
427431
i.e. characters that belong to the Punctuation (<code>P*</code>) <a>Unicode general category</a>,
428432
excluding Open Punctuation (<code>Ps</code>)
429433
and Dash Punctuation (<code>Pd</code>)--
430-
that follows the [=first letter=].
431-
<li>
432-
Any intervening typographic space--
433-
i.e. characters that belong to the <code>Zs</code> Unicode general category [[!UAX44]]--
434+
that follows the [=first letter=],
435+
as well as any intervening typographic space--
436+
characters belonging to the <code>Zs</code> Unicode general category [[!UAX44]]
434437
<em>other than</em>
435-
U+3000 IDEOGRAPHIC SPACE.
438+
U+3000 IDEOGRAPHIC SPACE or a [=word separator=].
436439
</ul>
437440

438441
<div class="note">
439442
Informally, the [=first-letter text=]’s pattern here
440443
can be roughly
441-
(ignoring the exclusion from <code>Zs</code>)
444+
(ignoring the exclusions from <code>Zs</code>)
442445
represented as a “regular expression”
443446
<code highlight="bnf" style="font-family: inherit">
444447
(P (Zs|P)*)? (L&#x7c;N|S) ((Zs|P−(Ps|Pd))* (P−(Ps|Pd))?</code>--
@@ -1882,7 +1885,8 @@ Changes</h2>
18821885
and <a href="https://github.com/w3c/csswg-drafts/issues/10213">10213</a>)
18831886
<li>Added ''::details-content'' pseudo-element
18841887
(<a href="https://github.com/w3c/csswg-drafts/pull/10379">Issue 10379</a>)
1885-
<li>Allow space and no-break space to be part of ''::first-letter''.
1888+
<li>Allow space and no-break space to be part of ''::first-letter''
1889+
when occuring before the [=first letter=].
18861890
(<a href="https://github.com/w3c/csswg-drafts/issues/9413">Issue 9413</a>)
18871891
<li>Renamed ''::postfix'' to ''::suffix''.
18881892
(Issue <a href="https://github.com/w3c/csswg-drafts/issues/11949">Issue 11949</a>)

‎css-text-3/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6057,7 +6057,7 @@ Word Spacing: the 'word-spacing' property</h3>
60576057
word-spacing/word-spacing-negative-value-001.html
60586058
</wpt>
60596059

6060-
<dfn id="word-separator" lt="word-separator character | word separator">Word-separator characters</dfn>
6060+
<dfn export id="word-separator" lt="word-separator character | word separator">Word-separator characters</dfn>
60616061
are [=typographic character units=]
60626062
whose primary purpose and general usage is to separate words.
60636063
In Unicode this includes

‎css-text-4/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9922,7 +9922,7 @@ Word Spacing: the 'word-spacing' property</h3>
99229922
word-spacing/word-spacing-negative-value-001.html
99239923
</wpt>
99249924

9925-
<dfn id="word-separator" lt="word-separator character | word separator">Word-separator characters</dfn>
9925+
<dfn export id="word-separator" lt="word-separator character | word separator">Word-separator characters</dfn>
99269926
are [=typographic character units=]
99279927
whose primary purpose and general usage is to separate words.
99289928
In Unicode this includes

0 commit comments

Comments
 (0)
Failed to load comments.