UNPKG

1.81 kBMarkdownView Raw
1# media-feature-name-case
2
3Specify lowercase or uppercase for media feature names.
4
5<!-- prettier-ignore -->
6```css
7@media (min-width: 700px) {}
8/** ↑
9 * This media feature name */
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`: `"lower"|"upper"`
17
18### `"lower"`
19
20The following patterns are considered violations:
21
22<!-- prettier-ignore -->
23```css
24@media (MIN-WIDTH: 700px) {}
25```
26
27<!-- prettier-ignore -->
28```css
29@media not all and (MONOCHROME) {}
30```
31
32<!-- prettier-ignore -->
33```css
34@media (min-width: 700px) and (ORIENTATION: landscape) {}
35```
36
37<!-- prettier-ignore -->
38```css
39@media (WIDTH > 10em) {}
40```
41
42The following patterns are _not_ considered violations:
43
44<!-- prettier-ignore -->
45```css
46@media (min-width: 700px) {}
47```
48
49<!-- prettier-ignore -->
50```css
51@media not all and (monochrome) {}
52```
53
54<!-- prettier-ignore -->
55```css
56@media (min-width: 700px) and (orientation: landscape) {}
57```
58
59<!-- prettier-ignore -->
60```css
61@media (width > 10em) {}
62```
63
64### `"upper"`
65
66The following patterns are considered violations:
67
68<!-- prettier-ignore -->
69```css
70@media (min-width: 700px) {}
71```
72
73<!-- prettier-ignore -->
74```css
75@media not all and (monochrome) {}
76```
77
78<!-- prettier-ignore -->
79```css
80@media (MIN-WIDTH: 700px) and (orientation: landscape) {}
81```
82
83<!-- prettier-ignore -->
84```css
85@media (10em < width <= 50em) {}
86```
87
88The following patterns are _not_ considered violations:
89
90<!-- prettier-ignore -->
91```css
92@media (MIN-WIDTH: 700px) {}
93```
94
95<!-- prettier-ignore -->
96```css
97@media not all and (MONOCHROME) {}
98```
99
100<!-- prettier-ignore -->
101```css
102@media (MIN-WIDTH: 700px) and (ORIENTATION: landscape) {}
103```
104
105<!-- prettier-ignore -->
106```css
107@media (10em < WIDTH <= 50em) {}
108```