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

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -