UNPKG

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