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
Post a Comment