Rule details
Warns when a selector uses a pseudo-class or pseudo-element name that doesn't exist in the CSS specifications (e.g. a typo like :hoverr or ::befor) — an unknown pseudo-class/element causes the entire selector (and rule) to be silently dropped by browsers.
What type of rule is this?
Warns about a potential problem
Example code
/* WARNING: 'hoverr' and 'befor' are typos, not real pseudo-classes/pseudo-elements */
a:hoverr {
color: red;
}
p::befor {
content: "";
}
/* OK */
a:hover {
color: red;
}
p::before {
content: "";
}
Prior Art
stylelint covers this with two separate rules:
Participation
AI acknowledgment
Additional comments
Disclosure: I'm a participant of open source contribution program OSSCA
Rule details
Warns when a selector uses a pseudo-class or pseudo-element name that doesn't exist in the CSS specifications (e.g. a typo like
:hoverror::befor) — an unknown pseudo-class/element causes the entire selector (and rule) to be silently dropped by browsers.What type of rule is this?
Warns about a potential problem
Example code
Prior Art
stylelint covers this with two separate rules:
Participation
AI acknowledgment
Additional comments
Disclosure: I'm a participant of open source contribution program OSSCA