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

If `{{` and `}}` are allowed, too much of indentation can be avoided this way:

```
.parent {{
    & {
        color: black;
    }

    & > div {
        color: red;
    }

    .super & {
        color: green;
    }
}}
```

What if we won't allow mixing properties and nesting in one block, so using `& {}` would be required if this block is used for nesting of other things? In this case we even could just use `{` and `}` instead of the `{{` and `}}`, and distinguish between properties-only and nesting-only blocks by the first token in the block (if it is `&`, current block is a nesting-only block)?

```
.parent {
    & {
        color: black;
    }

    & > div {
        color: red;
    }

    .super & {
        color: green;
    }
}
```

Just an idea.

-- 
GitHub Notification of comment by vrubleg
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4748#issuecomment-964834744 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 06:50:41 UTC