Add a selector equality check
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- web-dev
Research direction
Start by examining the selector AST and the Dart Sass selector AST, especially the linked operator equality and hash implementations. Define the API around semantic equality, including reordered :is() arguments and equivalent attribute value forms; done means these cases compare equal through the new public API.
Written by the indexing model from the issue text.
Description
One thing I would find very useful is the ability to check if two selectors are semantically equal. I'm currently comparing the string representations of selectors, but that doesn't capture the fact that (for example) :is(a, b) means the same thing as :is(b, a) or that [a=\-1] means the same thing as [a="-1"]. postcss-selector-parser notionally has enough information in its AST to make these comparisons, so it would be awesome if that logic was implemented and made available as an API.
For prior art, it may be useful to look at Dart Sass's AST and in particular implementations of the operator == and hash methods.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from postcss/postcss-selector-parser
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
postcss/postcss-selector-parser#332 · 1 reaction · 2 assignees ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
postcss/postcss-selector-parser#309 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
postcss/postcss-selector-parser#306 · 2 comments ·
All issues in postcss/postcss-selector-parser
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100