| Summary: | Ignore spaces when determining the length of text to treat as a first-letter pseudo-element | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | bfulgham, karlcow, mmaxfield, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://jsfiddle.net/85dc79ks/show | ||
|
Description
Ahmad Saleem
2023-02-03 08:36:54 PST
Looking at the test above, everything is green on Safari.
<div>Test</div>
<div> Test </div>
<div>(T)est</div>
<div> (T)est</div>
<div>“T”est</div>
<div>&Test</div>
<div> &Test</div>
<div>T&S<div>
<div>T & S<div>
<div>T & S<div>
<div>« S »</div>
<div>« S » </div>
<div>• </div>
<div> • </div>
with:
Test passes if all the T are green,
as well as punctuation elements
when they are adjacent to a letter (without spaces)
Ahmad, Thanks.
Probably it would be interesting to cross-check with tests in
https://wpt.fyi/results/css/css-pseudo?label=master&label=experimental&aligned&view=subtest&q=first-letter
(In reply to Karl Dubost from comment #1) > Looking at the test above, everything is green on Safari. > > > <div>Test</div> > <div> Test </div> > <div>(T)est</div> > <div> (T)est</div> > <div>“T”est</div> > <div>&Test</div> > <div> &Test</div> > <div>T&S<div> > <div>T & S<div> > <div>T & S<div> > <div>« S »</div> > <div>« S » </div> > <div>• </div> > <div> • </div> > > with: > Test passes if all the T are green, > as well as punctuation elements > when they are adjacent to a letter (without spaces) > > Ahmad, Thanks. > Probably it would be interesting to cross-check with tests in > https://wpt.fyi/results/css/css- > pseudo?label=master&label=experimental&aligned&view=subtest&q=first-letter This seems relevant - first-letter-punctuation-dynamic.html https://w3c.github.io/csswg-drafts/css-pseudo/#first-letter-pseudo The rules are pretty complex. https://w3c.github.io/csswg-drafts/css-pseudo/#first-letter-pattern Indeed https://wpt.fyi/results/css/css-pseudo/first-letter-punctuation-dynamic.html?label=master&label=experimental&aligned&view=subtest&q=first-letter The space here seems to be ignored in WebKit. I tried it in thiS PR - https://github.com/WebKit/WebKit/pull/10685 and it seems that there are some genuine failure with this patch. I tried to merge follow-up patch partially but it seems, it needs more than two patches to make it work in WebKit. I am still exploring it locally and might come back later, but if somemone knows quick solution or already working for future fix. I am happy for them to fix it. Thanks! |