Skip to content

Commit 31d2e2e

Browse files
committed
Update media-feature property names
1 parent 46e685d commit 31d2e2e

File tree

2 files changed

+152
-5
lines changed

2 files changed

+152
-5
lines changed

.dev-assets/syntax-issues/missing/at-media-properties-issue.css

Lines changed: 124 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,137 @@
22
* AT MEDIA PROPERTY
33
*/
44

5+
/*
6+
7+
any-hover
8+
any-pointer
9+
aspect-ratio
10+
color
11+
color-gamut
12+
color-index
13+
device-aspect-ratio
14+
device-height
15+
device-width
16+
display-mode
17+
dynamic-range
18+
forced-colors
19+
grid
20+
height
21+
hover
22+
inverted-colors
23+
monochrome
24+
orientation
25+
overflow-block
26+
overflow-inline
27+
pointer
28+
prefers-color-scheme
29+
prefers-contrast
30+
prefers-reduced-data
31+
prefers-reduced-motion
32+
prefers-reduced-transparency
33+
resolution
34+
scan
35+
scripting
36+
update
37+
video-dynamic-range
38+
width
39+
40+
any-hover
41+
any-pointer
42+
color-gamut
43+
dynamic-range
44+
forced-colors
45+
inverted-colors
46+
overflow-block
47+
overflow-inline
48+
pointer
49+
prefers-color-scheme
50+
prefers-contrast
51+
prefers-reduced-data
52+
prefers-reduced-motion
53+
prefers-reduced-transparency
54+
scripting
55+
update
56+
video-dynamic-range
57+
58+
59+
60+
61+
scripting
62+
63+
64+
65+
*/
66+
567
/* Missing tokens */
668
@media (any-hover: 0) {
769
}
870
@media (any-pointer: 0) {
971
}
72+
@media (aspect-ratio: 0) {
73+
}
74+
@media (color: 0) {
75+
}
1076
@media (color-gamut: 0) {
1177
}
12-
@media (prefers-reduced-motion: reduce) {
78+
@media (color-index: 0) {
79+
}
80+
81+
@media (device-aspect-ratio: 0) {
82+
}
83+
@media (device-height: 0) {
84+
}
85+
@media (device-width: 0) {
86+
}
87+
88+
@media (display-mode: 0) {
89+
}
90+
@media (dynamic-range: 0) {
91+
}
92+
@media (forced-colors: 0) {
93+
}
94+
@media (grid: 0) {
95+
}
96+
@media (height: 0) {
97+
}
98+
@media (hover: 0) {
99+
}
100+
@media (inverted-colors: 0) {
101+
}
102+
@media (monochrome: 0) {
103+
}
104+
@media (orientation: 0) {
105+
}
106+
@media (overflow-block: 0) {
107+
}
108+
@media (overflow-inline: 0) {
109+
}
110+
@media (pointer: 0) {
111+
}
112+
@media (prefers-color-scheme: 0) {
113+
}
114+
@media (prefers-contrast: 0) {
115+
}
116+
@media (prefers-reduced-data: 0) {
117+
}
118+
@media (prefers-reduced-motion: 0) {
119+
}
120+
@media (prefers-reduced-transparency: 0) {
121+
}
122+
@media (resolution: 0) {
123+
}
124+
@media (scan: 0) {
125+
}
126+
@media (scripting: 0) {
127+
}
128+
@media (update: 0) {
129+
}
130+
@media (video-dynamic-range: 0) {
131+
}
132+
@media (width: 0) {
133+
}
13134

135+
@media (nav-controls: 0) {
136+
}
14137

15138
/* NOTE: see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries#descriptors for more media properties */

src/vscode-css/grammars/css.cson

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,8 @@
17081708
(?:
17091709
# Standardised features
17101710
(
1711-
(?:min-|max-)? # Range features
1711+
# Range features
1712+
(?:min-|max-)?
17121713
(?: height
17131714
| width
17141715
| aspect-ratio
@@ -1717,11 +1718,34 @@
17171718
| monochrome
17181719
| resolution
17191720
)
1720-
| grid # Discrete features
1721-
| scan
1722-
| orientation
1721+
# Discrete features
1722+
| any-hover
1723+
| any-pointer
1724+
| color-gamut
17231725
| display-mode
1726+
| grid
17241727
| hover
1728+
| orientation
1729+
| overflow-block
1730+
| overflow-inline
1731+
| pointer
1732+
| scan
1733+
| update
1734+
1735+
# Media Queries 5 features
1736+
# Range features
1737+
| (?:min-|max-)?
1738+
(?: (?:horizontal|vertical)-viewport-segments
1739+
| video-color-gamut
1740+
)
1741+
# Discrete features
1742+
| (?:video-)?dynamic-range
1743+
| environment-blending
1744+
| forced-colors
1745+
| inverted-colors
1746+
| nav-controls
1747+
| prefers-(?:color-scheme|contrast|reduced-data|reduced-motion|reduced-transparency)
1748+
| scripting
17251749
)
17261750
|
17271751
# Deprecated features

0 commit comments

Comments
 (0)