You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,34 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
* Fix a regression with CSS media queries ([#4395](https://github.com/evanw/esbuild/issues/4395), [#4405](https://github.com/evanw/esbuild/issues/4405), [#4406](https://github.com/evanw/esbuild/issues/4406))
6
+
7
+
Version 0.25.11 of esbuild introduced support for parsing media queries. This unintentionally introduced a regression with printing media queries that use the `<media-type> and <media-condition-without-or>` grammar. Specifically, esbuild was failing to wrap an `or` clause with parentheses when inside `<media-condition-without-or>`. This release fixes the regression.
8
+
9
+
Here is an example:
10
+
11
+
```css
12
+
/* Original code */
13
+
@mediaonlyscreenand ((min-width: 10px) or (min-height: 10px)) {
14
+
a { color: red }
15
+
}
16
+
17
+
/* Old output (incorrect) */
18
+
@mediaonlyscreenand (min-width: 10px) or (min-height: 10px) {
19
+
a {
20
+
color: red;
21
+
}
22
+
}
23
+
24
+
/* New output (correct) */
25
+
@mediaonlyscreenand ((min-width: 10px) or (min-height: 10px)) {
26
+
a {
27
+
color: red;
28
+
}
29
+
}
30
+
```
31
+
3
32
## 0.27.3
4
33
5
34
* Preserve URL fragments in data URLs ([#4370](https://github.com/evanw/esbuild/issues/4370))
expectPrintedMangle(t, "@media (a) and ((b) or (c)) { a { color: red } }", "@media (a) and ((b) or (c)) {\n a {\n color: red;\n }\n}\n", "")
2640
2640
expectPrintedMangle(t, "@media (a) or ((b) and (c)) { a { color: red } }", "@media (a) or ((b) and (c)) {\n a {\n color: red;\n }\n}\n", "")
2641
2641
2642
+
expectPrintedMangle(t, "@media screen and (((a) and (b)) and (c)) { a { color: red } }", "@media screen and (a) and (b) and (c) {\n a {\n color: red;\n }\n}\n", "")
2643
+
expectPrintedMangle(t, "@media screen and (((a) or (b)) or (c)) { a { color: red } }", "@media screen and ((a) or (b) or (c)) {\n a {\n color: red;\n }\n}\n", "")
2644
+
expectPrintedMangle(t, "@media screen and ((a) and ((b) and (c))) { a { color: red } }", "@media screen and (a) and (b) and (c) {\n a {\n color: red;\n }\n}\n", "")
2645
+
expectPrintedMangle(t, "@media screen and ((a) or ((b) or (c))) { a { color: red } }", "@media screen and ((a) or (b) or (c)) {\n a {\n color: red;\n }\n}\n", "")
2646
+
2647
+
expectPrintedMangle(t, "@media screen and (((a) and (b)) or (c)) { a { color: red } }", "@media screen and (((a) and (b)) or (c)) {\n a {\n color: red;\n }\n}\n", "")
2648
+
expectPrintedMangle(t, "@media screen and (((a) or (b)) and (c)) { a { color: red } }", "@media screen and ((a) or (b)) and (c) {\n a {\n color: red;\n }\n}\n", "")
2649
+
expectPrintedMangle(t, "@media screen and ((a) and ((b) or (c))) { a { color: red } }", "@media screen and (a) and ((b) or (c)) {\n a {\n color: red;\n }\n}\n", "")
2650
+
expectPrintedMangle(t, "@media screen and ((a) or ((b) and (c))) { a { color: red } }", "@media screen and ((a) or ((b) and (c))) {\n a {\n color: red;\n }\n}\n", "")
2651
+
2642
2652
expectPrintedMangle(t, "@media not (not (color)) { a { color: red } }", "@media (color) {\n a {\n color: red;\n }\n}\n", "")
2643
2653
expectPrintedMangle(t, "@media not (not (not (color))) { a { color: red } }", "@media not (color) {\n a {\n color: red;\n }\n}\n", "")
2644
2654
expectPrintedMangle(t, "@media not (not (not (not (color)))) { a { color: red } }", "@media (color) {\n a {\n color: red;\n }\n}\n", "")
0 commit comments