UNPKG

857 BMarkdownView Raw
1# selector-attribute-operator-whitelist
2
3**_Deprecated: Instead use the [`selector-attribute-operator-allowed-list`](../selector-attribute-operator-allowed-list/README.md) rule._**
4
5Specify a list of allowed attribute operators.
6
7<!-- prettier-ignore -->
8```css
9[target="_blank"] {}
10/** ↑
11 * This operator */
12```
13
14## Options
15
16`array|string`: `["array", "of", "operators"]|"operator"`
17
18Given:
19
20```
21["=", "|="]
22```
23
24The following patterns are considered violations:
25
26<!-- prettier-ignore -->
27```css
28[class*="test"] {}
29```
30
31<!-- prettier-ignore -->
32```css
33[title~="flower"] {}
34```
35
36<!-- prettier-ignore -->
37```css
38[class^="top"] {}
39```
40
41The following patterns are _not_ considered violations:
42
43<!-- prettier-ignore -->
44```css
45[target] {}
46```
47
48<!-- prettier-ignore -->
49```css
50[target="_blank"] {}
51```
52
53<!-- prettier-ignore -->
54```css
55[class|="top"] {}
56```