Re: [csswg-drafts] [css-color-5] Allow using channel keywords in any calculation (#10983)

> whether sibling-*() is a math function, which it probably is not.

Correct, it's not, it's just a normal function.

> I do not know why "naked" math operations (sum/product) are not allowed outside of math functions

Because, while the boundaries of a calculation with other values is *grammatically* unambiguous, it's hard to spot with the naked eye. `1 +2` would match `<calc-sum> <number>`, for instance, but it sure looks like it's the same thing as `1 + 2`, which only matches `<calc-sum>`. To avoid this sort of confusion, we don't mix `<calc-sum>` with any other grammar terms, and this *generally* means it's not allowed nakedly at all, as that would limit how we could extend the grammar in the future. Wrapping it in a `calc()` is always clear and unambiguous.

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


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

Received on Thursday, 3 October 2024 20:26:03 UTC