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