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

I don't think it's hard to remove any heuristics from our proposal, and require explicit `&` wherever it's desired. That still leaves the double-indentation, but that doesn't bother me as much as a double syntax.

There would be another approach to achieving single-syntax, which is just to require `@nest` or some even-more-brief prefix on all nested selectors. Something like (using plain `@` for an extremely terse example):

```css
div {
  prop: value;

  @ & em { … }
  @ main & { … }
  @ & ~ div, p + & { … }
}
```

Though double-nesting still feels the easiest to read and write in my opinion.

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


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

Received on Tuesday, 28 September 2021 19:02:40 UTC