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

(Full disclosure: I [asked for comments on Twitter](https://twitter.com/tabatkins/status/1456670629436944392). I tried to be as even-handed as I could be.)

----

> And browser developers don't want to update their parsers to make the most convenient syntax possible? It is not that hard to implement look ahead to check if it looks like a property or not. It is worth to spend some time to implement it. It is quite an important thing, and it will be used by millions of developers.

It's not that "they don't want to". It's that everything browsers do with CSS is under extremely tight perf constraints, and arbitrary lookahead hurts that, when the entire rest of CSS can be parsed with a single token of lookahead (at the structural level, at least). And this is especially problematic when the *normal* behavior for most properties is to be ambiguous; every `color:red` declaration looks like a selector (matching a `<color>` element with a `:red` pseudo-class) until the ending `;`.

Preprocessors can happily eat the perf hit, because it's insignificant for their use-cases.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4748#issuecomment-962235742 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 21:34:55 UTC