Re: [csswg-drafts] [css-syntax] Concrete criteria for rule / declaration validity when being produced by a [compliant] parser? (#10359)

Yes, the rest of CSS beyond the Syntax spec has the actual grammar definitions of all the rules and declarations. What's in parse-css is a super generic notion of "validity" sufficient to differentiate between qualified rules and declarations when [consuming a block's contents](https://drafts.csswg.org/css-syntax/#consume-block-contents).

Of those checks in parse-css, the semicolon check isn't even strictly necessary for that purpose; it's just strictly guaranteed that such a construct will *always* be invalid in CSS because it's a rule that cannot, *by definition*, ever be nested, so we will *never* design a qualified rule that allows a top-level semicolon in its prelude (and no other language hosted on CSS syntax should, either).

The {}-block check for declarations is also slightly stronger than necessary - per Syntax, a non-custom property is allowed to have a {}-block as its *entire* value, and the parse-css check disallows that. I should probably fix that.

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


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

Received on Friday, 24 May 2024 22:24:48 UTC