Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there not equal ( !== ) statement in SCSS?

How to add additional style if the value is passed? Or is there any way to do it?

@mixin link($color, $color-hover:false){
 color: $color;
 @if $color-hover !== false {
  &:hover { color: $color-hover; }
 }
}
like image 842
phoxd Avatar asked Aug 19 '12 05:08

phoxd


1 Answers

Is != not working for you? I suppose you are trying with !==. i.e. a Double '=' instead of a single '=' prefixed with '!'. For SCSS, equality operators (==, !=) are supported for all types.

like image 80
GodMan Avatar answered Nov 13 '22 22:11

GodMan