selector-not-notation
Specify simple or complex notation for :not() pseudo-class selectors.
a:not(.foo, .bar) {}/** ↑ * This notation */Use this rule to enforce a convention. In Selectors Level 3, only a single simple selector was allowed as the argument to :not(), whereas Selectors Level 4 allows a selector list.
Choose:
"complex"to author modern Selectors Level 4 CSS"simple"for older browsers, which accept only a single simple selector
/* this complex notation has a specificity of 0,1,1 */a:not(.foo, .bar) {}
/* this simple notation has a specificity of 0,2,1 */a:not(.foo):not(.bar) {}The fix option can automatically fix most of the problems reported by this rule.
This rule supports 1 message argument: the configured notation.
Options
Section titled “Options”"simple"
Section titled “"simple"”{ "selector-not-notation": "simple"}The following patterns are considered problems:
:not(a, div) {}:not(a.foo) {}The following patterns are not considered problems:
:not(a):not(div) {}:not(a) {}"complex"
Section titled “"complex"”{ "selector-not-notation": "complex"}The following pattern is considered a problem:
:not(a):not(div) {}The following patterns are not considered problems:
:not(a, div) {}:not(a.foo) {}:not(a).foo:not(:empty) {}