- From: Mike Bremford via GitHub <sysbot+gh@w3.org>
- Date: Thu, 25 Feb 2021 14:31:15 +0000
- To: public-css-archive@w3.org
Whoops. They're definitely supposed to be strings, but "sans-serif" was the wrong choice - let's pretend I wrote "Arial" there. But actually I'm not sure about substituting `<any-value>` myself, because of the difficult typing it - that's why I'd stuck with strings and colors. The same issue applies for [attr()](https://www.w3.org/TR/css-values-4/#funcdef-attr) and general tokens are excluded there for the same reason. A nonsensical example to illustrate this is: `font: 12px if(100vw > 500px, bold, serif) sans-serif`. You can't evaluate any of this at parse time, which is where `calc()` is evaluated. So while I love the concept and the flexibility if offers, it's a totally different mechanism to the "math-like" version of the solution - the only solution I have an opinion on at this point, because it's so simple to do. Although I did finally think of a useful example - layout dependent background images. ```css background-image: if(width < 100px, url("small.png"), url("large.png")); ``` -- GitHub Notification of comment by faceless2 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5009#issuecomment-785936694 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 25 February 2021 14:31:17 UTC