UNPKG

1.62 kBMarkdownView Raw
1# selector-attribute-operator-space-after
2
3Require a single space or disallow whitespace after operators within attribute selectors.
4
5```css
6[target= _blank]
7/** ↑
8 * The space after operator */
9```
10
11The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
12
13## Options
14
15`string`: `"always"|"never"`
16
17### `"always"`
18
19There *must always* be a single space after the operator.
20
21The following patterns are considered violations:
22
23```css
24[target=_blank] {}
25```
26
27```css
28[target =_blank] {}
29```
30
31```css
32[target='_blank'] {}
33```
34
35```css
36[target="_blank"] {}
37```
38
39```css
40[target ='_blank'] {}
41```
42
43```css
44[target ="_blank"] {}
45```
46
47The following patterns are *not* considered violations:
48
49```css
50[target] {}
51```
52
53```css
54[target= _blank] {}
55```
56
57```css
58[target= '_blank'] {}
59```
60
61```css
62[target= "_blank"] {}
63```
64
65```css
66[target = _blank] {}
67```
68
69```css
70[target = '_blank'] {}
71```
72
73```css
74[target = "_blank"] {}
75```
76
77### `"never"`
78
79There *must never* be a single space after the operator.
80
81The following patterns are considered violations:
82
83```css
84[target= _blank] {}
85```
86
87```css
88[target = _blank] {}
89```
90
91```css
92[target= '_blank'] {}
93```
94
95```css
96[target= "_blank"] {}
97```
98
99```css
100[target = '_blank'] {}
101```
102
103```css
104[target = "_blank"] {}
105```
106
107The following patterns are *not* considered violations:
108
109```css
110[target] {}
111```
112
113```css
114[target=_blank] {}
115```
116
117```css
118[target='_blank'] {}
119```
120
121```css
122[target="_blank"] {}
123```
124
125```css
126[target =_blank] {}
127```
128
129```css
130[target ='_blank'] {}
131```
132
133```css
134[target ="_blank"] {}
135```