Skip to content

Missing support for selectors with CSS escapes #26

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

Open
VladyslavG opened this issue Aug 16, 2023 · 0 comments
Open

Missing support for selectors with CSS escapes #26

VladyslavG opened this issue Aug 16, 2023 · 0 comments

Comments

@VladyslavG
Copy link

Let's say we have a selector used to select an element in HTML with the class name "10w"

.\31 0w

This is valid selector according to https://jigsaw.w3.org/css-validator/#validate_by_input (enter .\31 0w {})

But when we parse it we get the following result

  {
    "type": "selectors",
    "nodes": [
        {
            "type": "selector",
            "nodes": [
                {
                    "type": "element",
                    "name": "31"
                },
                {
                    "type": "spacing",
                    "value": " "
                },
                {
                    "type": "invalid",
                    "value": "0"
                },
                {
                    "type": "element",
                    "name": "w"
                }
            ]
        }
    ]
}

While expected result is

  {
    "type": "selectors",
    "nodes": [
        {
            "type": "selector",
            "nodes": [
                {
                    "type": "class",
                    "name": "10w"
                }
            ]
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant