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

I've never used a preprocessor in a real-world project so my opinion offers either a unique perspective or absolutely no value whatsoever to this discussion, since I know the overwhelming majority of people that this spec is catering to are preprocessor users; that said, I also dislike the double layers of nesting and don't want to have to hypothetically fight my editor to get it not to indent the contents of nesting blocks just to avoid that (whether they start with `{` or `@nest {`).

I don't even want `@nest` to be shortened to `@n`. `@nest` communicates its functionality unambiguously, and if we're talking about saving keystrokes a reasonably advanced IDE could autocomplete or expand `@n` to (with appropriate indentation level)

```css
@nest <selector> {
 <declarations>
}
```

I like the nesting-by-combinator syntax that @mirisuzanne and @fantasai came up with, and would settle for the additional indentation only for that use case, because *at least* the indentation *has a functional purpose* and I'm not just doubly indenting things for the sake of it.

The only aspect of nesting that could be a problem to me is getting lost in a long (often top-level) series of nested rules, a common problem in many block-based programming languages and is somewhat alleviated with strategically placed comments, and a problem that is completely unrelated to this thread anyways.

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


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

Received on Friday, 5 November 2021 19:20:55 UTC