- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 01 Nov 2023 22:56:08 +0000
- To: public-css-archive@w3.org
@bradkemper 
Right, it wouldn't "help" the `@media (...) { i {...}}` example; this would continue to act exactly like the `i {...}` nested directly without the `@media`. We're just trying to avoid the problem where naked properties are treated differently based on whether they're nested or not.
In your example, the desugaring would be:
```css
button, .button {
   span {
      color: blue;
      @media (...) { 
         i {
            color: red; 
         }
      }
      @nest {
         color: green;
      }
   }
}
```
(only one `@nest` added, to capture the trailing `color:green`)
--------
@FremyCompany 
> At the risk of getting lynched, have we considered disallowing selector lists in nesting?
That would simply be broken, imo. Look at any Sass project; there's selectors lists at every level of nesting. And being able to use selector lists both in the parent and in the child, depending on whether it's a prefix or suffix being repeated, is a pretty vital bit of the functionality. Nothing about CSS is predicated on a meaningful distinction between stuff at the beginning of a selector vs the end (beyond the concept of the selector subject at all, of course).
-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9492#issuecomment-1789800189 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 1 November 2023 22:56:10 UTC