UNPKG

1.24 kBMarkdownView Raw
1# media-feature-parentheses-space-inside
2
3Require a single space or disallow whitespace on the inside of the parentheses within media features.
4
5<!-- prettier-ignore -->
6```css
7@media ( max-width: 300px ) {}
8/** ↑ ↑
9 * The space inside these two parentheses */
10```
11
12The [`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
20There _must always_ be a single space inside the parentheses.
21
22The following patterns are considered violations:
23
24<!-- prettier-ignore -->
25```css
26@media (max-width: 300px) {}
27```
28
29<!-- prettier-ignore -->
30```css
31@media (max-width: 300px ) {}
32```
33
34The following patterns are _not_ considered violations:
35
36<!-- prettier-ignore -->
37```css
38@media ( max-width: 300px ) {}
39```
40
41### `"never"`
42
43There _must never_ be whitespace on the inside the parentheses.
44
45The following patterns are considered violations:
46
47<!-- prettier-ignore -->
48```css
49@media ( max-width: 300px ) {}
50```
51
52<!-- prettier-ignore -->
53```css
54@media ( max-width: 300px) {}
55```
56
57The following patterns are _not_ considered violations:
58
59<!-- prettier-ignore -->
60```css
61@media (max-width: 300px) {}
62```