Kronuz / pyScss

pyScss, a Scss compiler for Python
MIT License
582 stars 140 forks source link

statements in if function should not be evaluated unless targeted #339

Closed kaaaahhhhnnnn closed 8 years ago

kaaaahhhhnnnn commented 9 years ago
color: if(false, <code block A>, <code block B>);

According to spec, code block A should not be evaluated, but it is. It's causing issues because I have:

if($propIndex, nth($strProps, $propIndex), 0);

and when propIndex is null, it throws an error.

My temporary work-around (for anyone else that might have this issue):

if($propIndex, nth($strProps, $propIndex or 1), 0);
eevee commented 8 years ago

Fixed in 1.3.5.