Re: [csswg-drafts] [css-values] Short-circuit if() evaluation (#11500)

A few nits...

Would it be possible to define arbitrary substitution functions with their "general grammar" first, then with their more specific and more restrictive grammar?

This would allow `w3c/reffy` to extract them with their general grammar, and would follow the expected processing order.

---

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.

A production name expressing which grammar is restricted or general may be helpful.

---

  > Assuming these all look good, I'll apply the same changes to `var()` and custom functions, but I'm leaving them alone for the moment to let this set of changes settle.

There is also `env()`, if I am not mistaken.

I presume that #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 #8771 as well.

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


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

Received on Wednesday, 9 April 2025 06:12:05 UTC