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
When transforming nested CSS to non-nested CSS, esbuild is supposed to filter out pseudo-elements such as `::placeholder` for correctness. The [CSS nesting specification](https://www.w3.org/TR/css-nesting-1/) says the following:
8
+
9
+
> The nesting selector cannot represent pseudo-elements (identical to the behavior of the ':is()' pseudo-class). We’d like to relax this restriction, but need to do so simultaneously for both ':is()' and '&', since they’re intentionally built on the same underlying mechanisms.
10
+
11
+
However, it seems like this behavior is different for nested at-rules such as `@supports`, which do work with pseudo-elements. So this release modifies esbuild's behavior to now take that into account:
12
+
13
+
```css
14
+
/* Original code */
15
+
::placeholder {
16
+
color: red;
17
+
body & { color: green }
18
+
@supports (color: blue) { color: blue }
19
+
}
20
+
21
+
/* Old output (with --supported:nesting=false) */
22
+
::placeholder {
23
+
color: red;
24
+
}
25
+
body :is() {
26
+
color: green;
27
+
}
28
+
@supports (color: blue) {
29
+
{
30
+
color: blue;
31
+
}
32
+
}
33
+
34
+
/* New output (with --supported:nesting=false) */
35
+
::placeholder {
36
+
color: red;
37
+
}
38
+
body :is() {
39
+
color: green;
40
+
}
41
+
@supports (color: blue) {
42
+
::placeholder {
43
+
color: blue;
44
+
}
45
+
}
46
+
```
47
+
3
48
## 0.25.9
4
49
5
50
* Better support building projects that use Yarn on Windows ([#3131](https://github.com/evanw/esbuild/issues/3131), [#3663](https://github.com/evanw/esbuild/issues/3663))
0 commit comments