Sha256: eccd5e1b420edd8ac5c974844e90a27ae8425aa41061b95cdc0dfe796a0fdf3c

Contents?: true

Size: 1.19 KB

Versions: 24

Compression:

Stored size: 1.19 KB

Contents

# selector-pseudo-element-no-unknown

Disallow unknown pseudo-element selectors.

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

This rule considers pseudo-element selectors defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

This rule ignores vendor-prefixed pseudo-element selectors.

## Options

### `true`

The following patterns are considered violations:

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

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

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

The following patterns are _not_ considered violations:

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

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

<!-- prettier-ignore -->
```css
::selection {}
```

<!-- prettier-ignore -->
```css
input::-moz-placeholder {}
```

## Optional secondary options

### `ignorePseudoElements: ["/regex/", "string"]`

Given:

```
["/^my-/", "pseudo-element"]
```

The following patterns are _not_ considered violations:

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

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

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

Version data entries

24 entries across 24 versions & 1 rubygems

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