Skip to content

Commit 0e0f832

Browse files
committed
Avoid checking a function name in the input
It may not be specified in lowercase.
1 parent 18271b9 commit 0e0f832

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/parse/preprocess.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,12 @@ function preParseCompoundSelector(node) {
192192
&& !isColon(next)
193193
&& findContext('function', node, node =>
194194
pseudos.logical[node.definition.name]
195-
// ::part(name):not(type) must be valid (but match nothing)
196-
&& node.input.prev(1, 1)?.name?.toLowerCase() !== 'part'
197195
&& findParent(
198196
node,
199-
node => node.definition.name === '<pseudo-compound-selector>',
197+
node =>
198+
node.parent?.definition.name === '<pseudo-compound-selector>'
199+
// ::part(name):not(type) must be valid (but match nothing)
200+
&& node.children[0].value[1][1].name !== 'part',
200201
node => node.definition.name === '<subclass-selector>'))
201202
) {
202203
return error(node)

0 commit comments

Comments
 (0)