scrapy / scrapy/cssselect

The parsing of :where and :is is not spec compliant

Open
#135 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

CSS Selectors Level 4 enhancement
Dominant language
Python
Stars
310
Forks
70
Avg merge
2h 9m
Merged PRs (30d)
4

Description

The parsing for :is and :where currently implements parsing a list of compound selectors while CSS supports any selector lists, i.e. lists of complex selectors.

Side note: the naming is confusing in this package as it uses the name "simple selector" to actually represent what is called "compound selector" in the CSS spec: https://www.w3.org/TR/selectors-4/#structure

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the parser implementation for :is and :where, then compare its compound-selector handling with the Selectors Level 4 structure specification linked in the issue. Done means both pseudo-classes accept lists of complex selectors rather than only lists of compound selectors, with coverage for the corrected parsing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.