RESOLVED FIXED 249990
Selector argument for :nth-of-type or :nth-last-of-type should be rejected
https://bugs.webkit.org/show_bug.cgi?id=249990
Summary Selector argument for :nth-of-type or :nth-last-of-type should be rejected
Tim Nguyen (:ntim)
Reported 2023-01-01 20:29:34 PST
Apparently :nth-of-type(n of S) parses and also has associated matching logic. Ditto for :nth-last-of-type(). https://github.com/web-platform-tests/wpt/blob/add22a2f6c1f9efcc1eccc66b3e9ea9e8045a4b5/css/selectors/nth-of-007.html The spec says it should not be supported: https://w3c.github.io/csswg-drafts/selectors/#nth-of-type-pseudo
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-01 20:30:11 PST
Tim Nguyen (:ntim)
Comment 2 2023-01-01 21:19:02 PST
This WPT now covers it: css/selectors/nth-of-invalid.html
Tim Nguyen (:ntim)
Comment 3 2023-01-02 22:53:14 PST
EWS
Comment 4 2023-01-03 09:48:22 PST
Committed 258389@main (008a2e643a90): <https://commits.webkit.org/258389@main> Reviewed commits have been landed. Closing PR #8140 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.