Re: [csswg-drafts] [css-cascade] Additive CSS

@jonjohnjohnson 

This looks similar to the `cascade` proposal [1] [2] which I still support. The exact proposal you made ith currentValue does not seem feasible to implement as you use it because most functions can take more than one parameter, or different parameters depending on what parameters are specified, and you need to support the case where filter has more than one filter specified. 

What you could do though is rely on a custom property to do the math, like this:

```
.selector {
--grayscale-value: calc(cascadedValue * 50%);
--grayscale-value: calc(cascadedValue - 25%);
--grayscale-value: calc(cascadedValue / 2);
filter: grayscale(var(--grayscale-value));
```

[1] https://lists.w3.org/Archives/Public/www-style/2013Apr/0711.html (coined `cascade`)
[2] https://lists.w3.org/Archives/Public/www-style/2014Apr/0197.html (additional use case)


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

Received on Thursday, 15 March 2018 02:39:42 UTC