- From: Marc Hoekstra via GitHub <sysbot+gh@w3.org>
- Date: Thu, 03 Aug 2023 13:55:09 +0000
- To: public-css-archive@w3.org
mrshoekstra has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-nesting] Nesting @media inside ::after not working ==
I'm not sure if this is the implementation of Google Chrome or [part of the spec](https://www.w3.org/TR/css-nesting-1/#nest-selector) (bug or feature).
I would like this to work, it seems this should work, but it doesn't:
Preferred (not working)
```css
body {
@media print {
}
@media screen {
&::after {
background: red;
content: '';
inset: 0;
position: absolute;
@media (width < 50rem) {
background: blue;
}
}
}
}
```
Working version with duplicate `@media screen` and `&::after {`
```css
body {
@media print {
}
@media screen {
&::after {
background: red;
content: '';
inset: 0;
position: absolute;
}
}
@media screen and (width < 50rem) {
&::after {
background: blue;
}
}
}
```
https://www.w3.org/TR/css-nesting-1/
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9153 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 3 August 2023 13:55:11 UTC