RE: [css-variables] Is making a property negative via `-var(--width)` valid syntax?

>> This is right. "CSS Variables" are some form of 

>>"Token Stream Reference" as I call them in the 

>> sense that they replace tokens, not chars. As a

>> matter of fact, you can pretty much insert /**/ 

>> before and after the var(...) declaration to see 

>> how it would be interpreted.

>>

>>     padding: -/**/1em;
>> 

>> doesn’t work, so doesn't
>> 

>>    padding: -/**/var(...);
>>
> Hmmm, I see. That makes sense, though I kind of 

> fear the backlash when people used to preprocessors

> discover they can't do that.

> 

> I suppose they could also do something like the following 

> if they found themselves needing to use the inverse version

> frequently:

> 
> {

>     --inverse-gutter: calc(-1 * var(--gutter));

> }



This is a beautiful workaround, indeed. 






Sorry for the empty email I just sent to the list, I noticed it was an html reply, so I aimed at clicking "delete" and clicked on "send" instead. Muscle memory, I guess. 		 	   		  

Received on Monday, 9 November 2015 21:21:48 UTC