8000 Support new :is and :where parsing by barak007 · Pull Request #25 · css-modules/css-selector-tokenizer · GitHub
Skip to content

Support new :is and :where parsing #25

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

Merged
merged 3 commits into from
Jun 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use tabs
  • Loading branch information
barak007 committed May 26, 2021
commit 36cee5dc8ddb93aa4c6d46363afafbc310cbaf72
94 changes: 50 additions & 44 deletions test/test-cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,50 +361,56 @@ module.exports = {
] }
])
],
"nested pseudo class with multiple selectors (:is)": [
":is( h1, h2 )",
singleSelector([
{
type: "nested-pseudo-class",
name: "is",
nodes: [
{
type: "selector",
nodes: [{ type: "element", name: "h1" }],
before: " ",
},
{
type: "selector",
nodes: [{ type: "element", name: "h2" }],
before: " ",
after: " ",
},
],
},
]),
],
"nested pseudo class with multiple selectors (:where)": [
":where( h1, h2 )",
singleSelector([
{
type: "nested-pseudo-class",
name: "where",
nodes: [
{
type: "selector",
nodes: [{ type: "element", name: "h1" }],
before: " ",
},
{
type: "selector",
nodes: [{ type: "element", name: "h2" }],
before: " ",
after: " ",
},
],
},
]),
],
"nested pseudo class with multiple selectors (:is)": [
":is( h1, h2 )",
singleSelector([{
type: "nested-pseudo-class",
name: "is",
nodes: [{
type: "selector",
nodes: [{
type: "element",
name: "h1"
}],
before: " ",
},
{
type: "selector",
nodes: [{
type: "element",
name: "h2"
}],
before: " ",
after: " ",
},
],
}, ]),
],
"nested pseudo class with multiple selectors (:where)": [
":where( h1, h2 )",
singleSelector([{
type: "nested-pseudo-class",
name: "where",
nodes: [{
type: "selector",
nodes: [{
type: "element",
name: "h1"
}],
before: " ",
},
{
type: "selector",
nodes: [{
type: "element",
name: "h2"
}],
before: " ",
after: " ",
},
],
}, ]),
],
"available nested pseudo classes": [
":not(:active):matches(:focus)",
singleSelector([
Expand Down