Skip to content

Wrong specificity #50

Description

@general03

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions