Loading…

Explain @else if directive?

@else if the derivative is used with the @if derivative when two codes have to run like if the condition is true then do this and @else if-if the condition is false.

Example

                                        

// $test: 5;

p {
@if $test < 5 {
     text-color: orange;
} @else if $test > 5 {
     text-color: green;
} @else if $test == 5 {
     text-color: blue;
}
}

Suggest An Answer

No suggestions avaliable!

Latest post from Sass Interview Questions

Ask Question