Skip to content

Files

Latest commit

 

History

History
48 lines (31 loc) · 877 Bytes

selector-pseudo-element-allowed-list.md

File metadata and controls

48 lines (31 loc) · 877 Bytes

Pattern: Use of non-allowed-listed pseudo-element selector

Issue: -

Description

This rule ignores:

  • CSS2 pseudo-elements i.e. those prefixed with a single colon
  • selectors that use variable interpolation e.g. ::#{$variable} {}

Examples

array|string|regex: ["array", "of", "unprefixed", "pseudo-elements" or "regex"]|"pseudo-element"|/regex/

Given:

["before", "/^my-/i"]

The following patterns are considered violations:

a::after {}
a::not-my-pseudo-element {}

The following patterns are not considered violations:

a::before {}
a::my-pseudo-element {}
a::MY-OTHER-pseudo-element {}

Further Reading