1 | # media-feature-range-operator-space-after
|
2 |
|
3 | Require a single space or disallow whitespace after the range operator in media features.
|
4 |
|
5 |
|
6 | ```css
|
7 | @media (width >= 600px) {}
|
8 | /** ↑
|
9 | * The space after this operator */
|
10 | ```
|
11 |
|
12 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
|
13 |
|
14 | ## Options
|
15 |
|
16 | `string`: `"always"|"never"`
|
17 |
|
18 | ### `"always"`
|
19 |
|
20 | There _must always_ be a single space after the range operator.
|
21 |
|
22 | The following patterns are considered violations:
|
23 |
|
24 |
|
25 | ```css
|
26 | @media (width>=600px) {}
|
27 | ```
|
28 |
|
29 |
|
30 | ```css
|
31 | @media (width >=600px) {}
|
32 | ```
|
33 |
|
34 | The following patterns are _not_ considered violations:
|
35 |
|
36 |
|
37 | ```css
|
38 | @media (width>= 600px) {}
|
39 | ```
|
40 |
|
41 |
|
42 | ```css
|
43 | @media (width >= 600px) {}
|
44 | ```
|
45 |
|
46 | ### `"never"`
|
47 |
|
48 | There _must never_ be whitespace after the range operator.
|
49 |
|
50 | The following patterns are considered violations:
|
51 |
|
52 |
|
53 | ```css
|
54 | @media (width>= 600px) {}
|
55 | ```
|
56 |
|
57 |
|
58 | ```css
|
59 | @media (width >= 600px) {}
|
60 | ```
|
61 |
|
62 | The following patterns are _not_ considered violations:
|
63 |
|
64 |
|
65 | ```css
|
66 | @media (width>=600px) {}
|
67 | ```
|
68 |
|
69 |
|
70 | ```css
|
71 | @media (width >=600px) {}
|
72 | ```
|