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