- From: Guillaume via GitHub <noreply@w3.org>
- Date: Tue, 17 Jun 2025 18:57:56 +0000
- To: public-css-archive@w3.org
> Is there a reason why `type()` can't also take a string, or has it just been overlooked? `type()` takes `<syntax>` which produces `<syntax-string>` as its alternatives. > A [`<syntax-string>`](https://drafts.csswg.org/css-values-5/#typedef-syntax-string) is a [`<string>`](https://drafts.csswg.org/css-values-4/#string-value) whose value successfully [parses](https://drafts.csswg.org/css-syntax-3/#css-parse-something-according-to-a-css-grammar) as a [`<syntax>`](https://drafts.csswg.org/css-values-5/#typedef-syntax), and represents the same value as that `<syntax>` would. It also takes `*`. I do not think they are any differences between the value ranges accepted in `syntax` and `type()`. I think you can even validate a `syntax` string value by parsing it as a `<syntax>`, instead of [consuming a syntax definition](https://drafts.css-houdini.org/css-properties-values-api-1/#consume-a-syntax-definition). -- GitHub Notification of comment by cdoublev Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12353#issuecomment-2981507556 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 17 June 2025 18:57:57 UTC