Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong specificity #50

Open
general03 opened this issue Apr 30, 2024 · 2 comments
Open

Wrong specificity #50

general03 opened this issue Apr 30, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@general03
Copy link

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

@jaraco
Copy link
Owner

jaraco commented May 14, 2024

Thanks for the report. I'm afraid I don't have the CSS expertise to even know which answer is right, but I'm happy to assume keegan.st is right. Would you or someone else be willing to investigate the cause and propose a solution?

@jaraco jaraco added the help wanted Extra attention is needed label May 14, 2024
@general03
Copy link
Author

Thanks for your answser, I will try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants