Re: [csswg-drafts] [css-syntax] Review requested of new Parsing text (#8834)

In Chrome and FF (non-exhaustive), this is entirely invalid:

```css
style { --custom: fn(}); color: green }
```

If this is expected, there is an oversight in the new text. [Consume a function](https://drafts.csswg.org/css-syntax-3/#consume-function) and [consume a simple block](https://drafts.csswg.org/css-syntax-3/#consume-simple-block) should presumably receive `nested` from [consume a list of component values](https://drafts.csswg.org/css-syntax-3/#consume-list-of-components), and return their value when they see `<}-token>`.

On the other hand, this is entirely valid:

```css
style { --custom: fn(;); color: green }
```

So `;` and `}` are inconsistently interpreted as a stop token closing the declaration or the rule, depending on whether they are in a function or simple block. I do not know how much backward compatibility comes into play here, but this surprised me.

This is consistent with `<declaration-value>` though (related: #11315), which explicitly allows a nested `<semicolon-token>`.

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


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

Received on Wednesday, 26 March 2025 20:20:24 UTC