Re: [csswg-drafts] [css-nesting] Syntax suggestion (#4748)

Final idea from me, I think. I daresay that it might give us the best of both worlds... 🤷‍♂️

```css
ul.parent {
    padding-left: 0;

    /*
        Inline nesting declarations can stay like they are now (or be reduced 
        to a single syntax where `@nest` is a required prefix, whatever)
    */
    & li.child { list-style-type: none; }
    @nest .wysiwyg & { list-style-type: initial; }

    /*
        Block nesting has explicit and unique start and end keywords. Also, it
        doesn't use brackets, so there's no particular need to indent the block.
    */
    @nestStart
    /* ul.parent li.child */
    li.child {
        list-style-type: none;
    }

    /* .wysiwyg ul.parent */
    .wysiwyg & {
        list-style-type: initial;
    }
    @nestEnd
}
```

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


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

Received on Wednesday, 10 November 2021 14:46:34 UTC