Wrong specificity
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Run the provided CSSParser.parseString reproduction first, then trace how selectorList[0].specificity is calculated for the shown selector. Compare the result with the expected specificity from the linked calculator; done means the reported specificity is corrected and the reproduction no longer shows the discrepancy.
Written by the indexing model from the issue text.
Description
Hello,
I got wrong specificity on this selector .form-floating > .form-control:focus ~ label::after, with https://specificity.keegan.st/ I see 032 whereas with your tool 022
Script to reproduce :
from cssutils import CSSParser
parser = CSSParser(parseComments=False, validate=None)
allrules = parser.parseString(
".form-floating > .form-control:focus ~ label::after{color:red}"
)
for el in allrules:
print(el.selectorList[0].specificity) # (0, 0, 2, 2)
Thanks
- Dominant language
- Python
- Stars
- 92
- Forks
- 30
- 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 jaraco/cssutils
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
good first issue help wanted
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·