Sha256: 7146b8c2a29dea13c039736318f63d2f3879b8698827e337ee416cedea6ac0f6

Contents?: true

Size: 904 Bytes

Versions: 23

Compression:

Stored size: 904 Bytes

Contents

# selector-pseudo-element-whitelist

Specify a whitelist of allowed pseudo-element selectors.

<!-- prettier-ignore -->
```css
  a::before {}
/**  ↑
 * This pseudo-element selector */
```

This rule ignores:

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

## Options

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

Given:

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

The following patterns are considered violations:

<!-- prettier-ignore -->
```css
a::after {}
```

<!-- prettier-ignore -->
```css
a::not-my-pseudo-element {}
```

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a::before {}
```

<!-- prettier-ignore -->
```css
a::my-pseudo-element {}
```

<!-- prettier-ignore -->
```css
a::MY-OTHER-pseudo-element {}
```

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-cms-5.0.7 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.6 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.5 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.4 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.3 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.2 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.1 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3.5 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-5.0.0 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3.4 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3.3 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3.2 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3.1 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.3 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.2.3 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.2.2 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.2.1 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.2 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.1.9 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md
trusty-cms-4.1.8 node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md