- From: François REMY via GitHub <sysbot+gh@w3.org>
- Date: Wed, 03 Mar 2021 11:23:49 +0000
- To: public-css-archive@w3.org
> There is no duplication, the var fallback is using sRGB while the --my-profile is using whatever parameters it taks (in this case three, I'm using ProPhoto RGB for the example) This is not the duplication I was talking about :) What I was saying is that the rgb() values are now in the fallback of the var() and thus each time you want to use that color you have to repeat them, which defeats the purpose of using a variable in the first place. The advantage of variables is that if you need to change the color to match a new palette, you should be able to it from one place, not each time you use the color. Putting the fallback in the var() does not work, because you could have a dark theme and a light theme, and thus the fallback you want would be different in those two cases. > > Plus, this doesn't work. [...] it will not cause an error until after it has been replaced in the color property [...] this requires yet another declaration > > Well, it works in my implementation (if the value contains a _single_ `var()` substitution that does not yield a valid value, then the fallback is directly used), but yes you are right that in browsers it does require another declaration. What user agent are you talking about? I don't think your user agent should decided not to follow the normal behavior of CSS specs, this might seem convenient right now but this is bound to cause issues down the line. Regardless, I think it would be best if we stuck to discussing user agents that follow the specs in this working group, otherwise we are not going to make progress. In the real world, the proposed fallback through variables requires at three declarations for each color for which you need a fallback, I don't think this is reasonable. -- GitHub Notification of comment by FremyCompany Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5931#issuecomment-789644518 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 3 March 2021 11:23:51 UTC