8000 Test all punctiation and whitespace codepoints that should be included in ::first-letter by johannesodland · Pull Request #51361 · web-platform-tests/wpt · GitHub
[go: up one dir, main page]

Skip to content

Conversation

johannesodland
Copy link
Contributor

This PR replaces the existing test by testing each punctuation and whitespace character that should be included in the ::first-letter pseudo-element.

@johannesodland johannesodland force-pushed the first-letter-punctuation-and-whitespace branch from 0ea11e7 to 5ff9bcd Compare March 25, 2025 06:44
@johannesodland johannesodland marked this pull request as ready for review March 25, 2025 06:48
@wpt-pr-bot wpt-pr-bot requested review from frivoal and plinss March 25, 2025 06:48
@johannesodland johannesodland force-pushed the first-letter-punctuation-and-whitespace branch 2 times, most recently from 602baa9 to d7eba4f Compare March 25, 2025 19:23
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 11, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
@jfkthame
Copy link
Contributor

Thanks for doing this. I notice that a bunch of the existing tests (in css/CSS2/selectors/first-letter-punctuation-*) are no longer correct according to the current CSS-Pseudo spec text, so it would be good to get new tests in place.

One thing to note: the spec allows for multiple punctuation codepoints before and/or after the "letter" itself, with potential intervening whitespace (but not word-separator spaces after the letter). It would be good to include a selection of tests for such longer sequences, which I don't think currently have any coverage.

E.g. in something (extreme) like

    <p> -&nbsp;–&nbsp;—&nbsp;(&#x2009;“H”&#x2009;)ello

my understanding is that everything up to and including the closing parenthesis would be part of ::first-letter.

@johannesodland johannesodland force-pushed the first-letter-punctuation-and-whitespace branch from d7eba4f to 2a4f932 Compare April 15, 2025 08:25
@johannesodland johannesodland force-pushed the first-letter-punctuation-and-whitespace branch from 2a4f932 to 49e1b5b Compare April 15, 2025 08:35
@johannesodland
Copy link
Contributor Author

One thing to note: the spec allows for multiple punctuation codepoints before and/or after the "letter" itself, with potential intervening whitespace (but not word-separator spaces after the letter). It would be good to include a selection of tests for such longer sequences, which I don't think currently have any coverage.

Good call.
I added tests for multiple preceding and following punctuations, and multiple intervening white spaces both before and after the letter. I don't think it's necessary to test all combinations exhaustively.

🙏

gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Apr 16, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674

UltraBlame original commit: a59c7ce8c81e8949b92e606055ae7f58726eba5b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Apr 16, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674

UltraBlame original commit: a59c7ce8c81e8949b92e606055ae7f58726eba5b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Apr 16, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674

UltraBlame original commit: a59c7ce8c81e8949b92e606055ae7f58726eba5b
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Apr 16, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 22, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 22, 2025
…ests that no longer pass. r=jwatt

These tests are based on the CSS2 spec for ::first-letter, and no longer match the current
CSS Pseudos spec. Once the new and more comprehensive collection of tests in
web-platform-tests/wpt#51361 is merged, it would probably make sense
to remove these as being obsolete, but for the time being I'm marking them as expected-fail.

Differential Revision: https://phabricator.services.mozilla.com/D245359
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Apr 23, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Apr 23, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Apr 23, 2025
…ests that no longer pass. r=jwatt

These tests are based on the CSS2 spec for ::first-letter, and no longer match the current
CSS Pseudos spec. Once the new and more comprehensive collection of tests in
web-platform-tests/wpt#51361 is merged, it would probably make sense
to remove these as being obsolete, but for the time being I'm marking them as expected-fail.

Differential Revision: https://phabricator.services.mozilla.com/D245359
shtrom pushed a commit to mozilla-conduit/ff-test that referenced this pull request Apr 28, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
shtrom pushed a commit to mozilla-conduit/ff-test that referenced this pull request Apr 28, 2025
…ests that no longer pass. r=jwatt

These tests are based on the CSS2 spec for ::first-letter, and no longer match the current
CSS Pseudos spec. Once the new and more comprehensive collection of tests in
web-platform-tests/wpt#51361 is merged, it would probably make sense
to remove these as being obsolete, but for the time being I'm marking them as expected-fail.

Differential Revision: https://phabricator.services.mozilla.com/D245359
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Apr 29, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Apr 29, 2025
…ests that no longer pass. r=jwatt

These tests are based on the CSS2 spec for ::first-letter, and no longer match the current
CSS Pseudos spec. Once the new and more comprehensive collection of tests in
web-platform-tests/wpt#51361 is merged, it would probably make sense
to remove these as being obsolete, but for the time being I'm marking them as expected-fail.

Differential Revision: https://phabricator.services.mozilla.com/D245359
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
… punctuation and letter in ::first-letter range. r=dshin

And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once web-platform-tests/wpt#51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0