How to overwrite SCSS variables when compiling to CSS

You’re setting the color after it has already been used. Basically, what you’re trying to do is this:

$color: red;

.foo {
    background: $color;
}

$color: green;

Depending on how jqtouch is written, you might not be able to modify the colors at all. You need the variables to be set as a default in order to overwrite them ahead of time:

$color: green;
$color: red !default; // red is only used if $color is not already set

.foo {
    background: $color; // color is green
}

So your code should be written as such:

// Override variables
$base-color: #fe892a;/* The default base which is later used for toolbar, list, and button backgrounds.*/

@import 'jqtouch';

Leave a Comment