- From: andruud via GitHub <sysbot+gh@w3.org>
- Date: Mon, 11 Sep 2023 12:49:15 +0000
- To: public-css-archive@w3.org
andruud has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-syntax] Dashed-ident rules and error recovery ==
After a recent edit in relation to relaxed nesting, [css-syntax now says this](https://drafts.csswg.org/css-syntax/#consume-qualified-rule):
> [<{-token>](https://drafts.csswg.org/css-syntax/#tokendef-open-curly)
If the first two non-[<whitespace-token>](https://drafts.csswg.org/css-syntax/#typedef-whitespace-token) values of rule’s prelude are an [<ident-token>](https://drafts.csswg.org/css-syntax/#typedef-ident-token) whose value starts with "--" followed by a [<colon-token>](https://drafts.csswg.org/css-syntax/#typedef-colon-token), [consume the remnants of a bad declaration](https://drafts.csswg.org/css-syntax/#consume-the-remnants-of-a-bad-declaration) from input, with nested, and return nothing.
Unless I'm mistaken, this means that encountering this situation top-level means we'll treat the entire rest of the stylesheet as a "bad declaration".
```
--foo:hover {
color: red;
}
/* Lots of other innocent and valid rules here */
```
That is probably a bit extreme, and makes the change a bit hard to ship, since it _could_ affects existing sites (drastically).
Perhaps we can limit the behavior to when `nested` is `true`? Or something else? @tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9336 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 11 September 2023 12:49:17 UTC