Re: [csswg-drafts] [css-nesting-1] CSSOM for nested media query rules (#7850)

> _...If the first non-comment token in a @media (or @supports, etc.) block is not a & or an at-rule, the entire block is implicitly wrapped in & {}. I don't have strong opinions on whether that & {} should be removed again in serialization or not._

Hi @sesse 

IMO like this, implicitly wrapped if it does not exist, but should probably not be remved in serialization.

```css
div {
  color: red;
  @media (min-width > 100px) {
    & {color: green;}
    & span {color: blue;}
  }
}
```

At least how I am thinking of the ampersand to be like the ` $ ` in a regex rewrite, considering the ` & ` as a symbol for the parent selector.


-- 
GitHub Notification of comment by Myndex
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7850#issuecomment-1276711761 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 October 2022 20:38:29 UTC