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

Does not parse anything inside :host() and :host-context() #286

Closed
zicsus opened this issue Sep 22, 2020 · 3 comments
Closed

Does not parse anything inside :host() and :host-context() #286

zicsus opened this issue Sep 22, 2020 · 3 comments

Comments

@zicsus
Copy link
Contributor

zicsus commented Sep 22, 2020

Hi,
So I found out that css-what does not parse anything inside :host() and :host-context() and just return the value as it is.

For example:
If you try to parse :host-context(#test.cl) it returns-
[[{type: "pseudo", name: "host-context", data: "#test.cl"}]]

Expected output-
[[{type: "pseudo", name: "host-context", data: [[ {type:"attribute", name:"id", value="test"....}, {type:"attribute", name:"class", value="cl"....} ]] }]]

Thanks!

@fb55
Copy link
Owner

fb55 commented Sep 23, 2020

:host and :host-context aren't a part of the current list of pseudo selectors to parse, in

const unpackPseudos = new Set(["has", "not", "matches", "is"]);

Happy to accept a PR that adds them to this list.

@zicsus
Copy link
Contributor Author

zicsus commented Sep 24, 2020

:host and :host-context aren't a part of the current list of pseudo selectors to parse, in

const unpackPseudos = new Set(["has", "not", "matches", "is"]);

Happy to accept a PR that adds them to this list.

Here you go - #288

@fb55
Copy link
Owner

fb55 commented Sep 24, 2020

Awesome, thanks!

@fb55 fb55 closed this as completed Sep 24, 2020
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

2 participants