if else statement in Sass

Simple if else statement that change the background of the header depending on the value of the $theme variable.

$theme: blue;
header {
  @if $theme == blue {
  	background: #0000ff;
  } @else if $theme == pink {
  	background: $theme;
  } @else {
  	background: #fff;
  }
}

Add your comment