Open kizu opened 10 years ago
Sass have if() function that can be converted to a ternary operator in Stylus. So, we should convert this Sass:
if()
.bar margin: if(true, 10px, 20px) padding: if(false, 10px, 20px)
to this Stylus:
.bar margin: (true ? 10px : 20px) padding: (false ? 10px : 20px)
Note: it is better to keep the parens above the ternary operator, as there could be conflicts otherwise in more complex cases.
:+1:
Sass have
if()
function that can be converted to a ternary operator in Stylus. So, we should convert this Sass:to this Stylus:
Note: it is better to keep the parens above the ternary operator, as there could be conflicts otherwise in more complex cases.