selector-pseudo-element-disallowed-list
Specify a list of disallowed pseudo-element selectors.
a::before {}/** ↑ * This pseudo-element selector */Use this rule to enforce a convention. For example, disallow /^-webkit-scrollbar/ in favor of scrollbar-color and scrollbar-width, to follow the specification.
This rule ignores:
- CSS2 pseudo-elements i.e. those prefixed with a single colon
- selectors that use variable interpolation e.g.
::#{$variable} {}
This rule supports 1 message argument: the disallowed pseudo-element.
Options
Section titled “Options”Array<string>
Section titled “Array<string>”["array", "of", "pseudo-elements", "/regex/"]Given:
{ "selector-pseudo-element-disallowed-list": ["before", "/^--my-/i"]}The following patterns are considered problems:
a::before {}a::--my-pseudo-element {}a::--MY-OTHER-pseudo-element {}The following patterns are not considered problems:
a::after {}a::--not-my-pseudo-element {}