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

Fix CSS selector splitting #24

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

ilanus
Copy link
Contributor

@ilanus ilanus commented Mar 30, 2022

Closes #22

Fixes split for CSS selectors.

splitSelectors(".a, .b")
// [ '.a', '.b' ]

splitSelectors(".a")
// [ '.a' ]

splitSelectors("::slotted(:is(button, a):active), ::slotted(:is(button, a):hover)")
// [
//   '::slotted(:is(button, a):active)',
//   '::slotted(:is(button, a):hover)'
// ]

splitSelectors("::slotted(:is(button, a):active)")
// [ '::slotted(:is(button, a):active)' ]

splitSelectors(":host([type='secondary']) ::slotted(:is(button, a)), :host([type='primary']) ::slotted(:is(button, a):active)")
// [
//   ":host([type='secondary']) ::slotted(:is(button, a))",
//   ":host([type='primary']) ::slotted(:is(button, a):active)"
// ]

splitSelectors(":host([outline]) ::slotted(:is(button, a):focus-within:focus-visible:not(:active))")
// [
//   ':host([outline]) ::slotted(:is(button, a):focus-within:focus-visible:not(:active))'
// ]

@ghengeveld ghengeveld merged commit d35696f into chromaui:main Apr 6, 2022
@github-actions
Copy link

🚀 PR was released in v1.14.0 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several pseudo selectors inside ::slotted() not working
2 participants