You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<body> should be green, not orange. That will allow parameterization of @apply mixins, which is what authors really want (and already do with preprocessors, bloating the CSS size as it spits out different code for each call). If it's just about copying a bunch of declarations, they can always preprocess that. It's also surprising, given that in every other case variables resolve based on current element.
The text was updated successfully, but these errors were encountered:
It sees the var(), and substitutes it as normal. The fact that you later are subbing in --bg via an @apply rule rather than a var() is meaningless.
That said, plan for a later version of Custom Properties is to have a var() option that causes it to be substituted at time of use (when it's used in something other than an untyped custom property), which will achieve what you're looking for.
For example, in the following code (live demo - works in Chrome with flag)
<body>
should be green, not orange. That will allow parameterization of@apply
mixins, which is what authors really want (and already do with preprocessors, bloating the CSS size as it spits out different code for each call). If it's just about copying a bunch of declarations, they can always preprocess that. It's also surprising, given that in every other case variables resolve based on current element.The text was updated successfully, but these errors were encountered: