- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 05 May 2025 21:55:50 +0000
- To: public-css-archive@w3.org
> Would it be possible to define arbitrary substitution functions with their "general grammar" first, then with their more specific and more restrictive grammar? I would prefer Reffy, and any tools that rely on CSS grammar, to care about their "normal" grammar more than their "argument grammar". The argument grammar is relatively useless for showing what a function's contents should look like, it just lets us slice things up in a way that allows for partial substitution/late evaluation. > The "general grammar" production is named after the production of the arbitrary substitution function suffixed with -args, but redefines the whole function, not just its arguments. This seems a bit unfortunate in my opinion. Hm, I could potentially see us removing the `func( ... )` wrapper from the definition, but it seems like it makes it less clear what's being defined. It is, essentially, doing the same thing as the main definition - defining how to parse the function. > A production name expressing which grammar is restricted or general may be helpful. What do you mean by this? > I presume that https://github.com/w3c/csswg-drafts/issues/11144 is left open because of this, and that this incoming change will make var(--custom, var(1)) or even var(1) valid at parse time, which would allow to close https://github.com/w3c/csswg-drafts/issues/8771 as well. Yes, and I'll go close those two now. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11500#issuecomment-2852428168 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 5 May 2025 21:55:50 UTC