- From: Romain Menke via GitHub <sysbot+gh@w3.org>
- Date: Sat, 29 Mar 2025 09:16:19 +0000
- To: public-css-archive@w3.org
I am not sure if context specific productions can be used here as the channel keywords aren't valid everywhere in a relative color function. This is invalid: `rgb(from hsl(calc(r) 0 0) 0 0 0)` `calc(r)` is only valid in the channel positions for `rgb()`, not in the `hsl()` color in this example. ----- > This does not address the issue in calculations though, whereas a prose defining that any numeric value in a color function can be replaced with a corresponding component keyword, addresses both concerns, which is more straightforward. Indeed but this issue is specifically about avoiding prose and being able to express it in a syntax definition :) > I do not know if you intentionally left out infering which color component keywords are valid outside calculations. Those can indeed already be expressed today and doing so would be slightly better, but I am unsure if it is worth it as long as we can not express what is valid as a `calc-keyword`. My use case is linters where it isn't realistic to write manual parsers/validations for everything as no one is willing to fund such efforts. Being able to express it in syntax definitions makes it possible to use `@webref/css` as a data source and `css-tree` as the validator. As I understand it this is something that browser implementers are also interested in. -- GitHub Notification of comment by romainmenke Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11505#issuecomment-2763249175 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 29 March 2025 09:16:20 UTC