Issue of adding If in Sass files

void if constructions using exposed Sass variables. For example:

@if $sc-color-secondary == $12345 { background-color: $sc-color-primary;}

@else { background-color: $56789;}

The problem with this is that the frontend does not know the else condition. Passing values within or grouping variables as mixins causes a similar issue. All of these issues are solved during the backend compilation, but this can take a considerable amount of time.

Leave a comment

Your email address will not be published. Required fields are marked *