Re: [csswg-drafts] Custom mathematical functions (#7490)

I'd assume that the argument syntax validation would match what's done [for `@property`](https://drafts.css-houdini.org/css-properties-values-api/#the-syntax-descriptor).  If that's the case, I don't immediately see anything that would make this *particularly* difficult.

One issue that might (but I'm not sure) be difficult (although maybe more for designing/specifying the feature than for implementing it) is determining *when* the functions are resolved.  (Does it work like `calc()` and depend on what the arguments are?)

The syntax you propose seems generally reasonable, although there are various ways it could be changed.  For example, I probably wouldn't do both of requiring `--` for the arguments *and* requiring references to them be in an `arg()` function, but we probably do want at least one or the other, or something like them.  (I think I'd lean towards not using the `--`, and keeping `arg()`.)

There's also a question of whether this could interact with features like `inherit`, `initial`, or more advanced extensions like that proposed in #2864.  (That is, whether the `result` could use those things.)

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


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

Received on Tuesday, 12 July 2022 19:03:02 UTC