Skip to content

Commit a04a40d

Browse files
authored
Add 'where' pseudo selector (#620)
1 parent 933a032 commit a04a40d

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/__fixtures__/tests.ts

+21
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,27 @@ export const tests: [
458458
],
459459
"pseudo selector with data",
460460
],
461+
[
462+
":where(a)",
463+
[
464+
[
465+
{
466+
type: "pseudo",
467+
name: "where",
468+
data: [
469+
[
470+
{
471+
type: "tag",
472+
namespace: null,
473+
name: "a",
474+
},
475+
],
476+
],
477+
},
478+
],
479+
],
480+
"pseudo selector with data",
481+
],
461482
[
462483
':contains("(a((foo\\\\\\))))")',
463484
[

src/parse.ts

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ const unpackPseudos = new Set([
109109
"not",
110110
"matches",
111111
"is",
112+
"where",
112113
"host",
113114
"host-context",
114115
]);

0 commit comments

Comments
 (0)