Does SASS/SCSS/Compass have a SWITCH function? -


with sass' ability use variables, 1 hope there large set of logic functions can them.

is there way this?

$somevar: somevalue !default;  @switch $somevar {     @case 'red':         .arbitrary-css here {}      @break;      @case 'green':         .arbitrary-css here {}      @break;      @case 'blue':         .arbitrary-css here {}      @break; } 

however, can't find in sass reference this.

sass doesn't support switch case.

sass support 4 control directives:

  • @if

  • @for

  • @each

  • @while


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -