Bug 216963 - ::first-letter should include preceding punctuation and space separators
Summary: ::first-letter should include preceding punctuation and space separators
Status: RESOLVED DUPLICATE of bug 179815
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 14
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2020-09-24 23:31 PDT by Johannes Odland
Modified: 2021-08-11 04:39 PDT (History)
7 users (show)

See Also:


Attachments
Screen shot from example (85.41 KB, image/png)
2020-09-24 23:31 PDT, Johannes Odland
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Odland 2020-09-24 23:31:12 PDT
Created attachment 409660 [details]
Screen shot from example

Characters in the P* category and intervening space separators should be included in the ::first-letter pseudo element: 

 
https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
> Punctuation (i.e, characters that belong to the Punctuation (P*) Unicode general category [UAX44]) that precedes or follows the first typographic letter unit and any intervening space separators (characters that belong to the Zs Unicode general category [UAX44]) must also be included in the ::first-letter pseudo-element.



Steps to reproduce: 

1. Go to https://codepen.io/johannesodland/pen/LYGYWyY

Expected result: 
The second ::first-letter pseudo element should contain "« V"
The third ::first-letter pseudo element should contain "– P"

Actual result: 
The third ::first-letter pseudo element only contain "–"
Comment 1 Radar WebKit Bug Importer 2020-10-01 23:33:31 PDT
<rdar://problem/69870767>
Comment 2 Jen Simmons 2021-01-13 09:48:04 PST
The CSSWG is refining the specification of how exactly the ::first-letter selection algorithm works. Example: https://github.com/w3c/csswg-drafts/issues/5830

Once the updates to the specification are complete, Webkit will need to be updated to comply.
Comment 3 Sam Sneddon [:gsnedders] 2021-08-11 04:39:04 PDT

*** This bug has been marked as a duplicate of bug 179815 ***