-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't workingSomething isn't working
Description
Environment
ESLint version: 9.32.0
@eslint/css version: 0.11.0
Node version: 22.11.0
npm version: 11.2.0
Operating System: Windows 11
Which language are you using?
stylesheet
What did you do?
/* Does not work */
main {
p:first-of-type {
margin-top: 0;
}
}
/* Works */
main {
p {
&:first-of-type {
margin-top: 0;
}
}
}
What did you expect to happen?
No errors from ESlint
What actually happened?
Without tolerant mode: Parsing error: Unexpected input
With tolerant mode: Unknown property 'p' found
Additional comments
Once I introduced @eslint/css into my project, I ran into several of these issues. The CSS should be correct, is in production and works in all tested browsers.
It looks like any selector that has both element type and a pseudo-class is not recognized as a selector, but instead the parser tries to parse it as a property declaration.
The problem only occurs if the selector is nested.
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't workingSomething isn't working
Type
Projects
Status
Blocked