$current_theme: "theme_two";
@mixin themes {
@if $current_theme == "theme_one" {
$white: #ffffff;
$black: #1d1d1b;
$red: #cd1719;
$yellow: #ffdd00;
@content;
}
@if $current_theme == "theme_two" {
$blue: #009bc9;
$lightblue: #9fd8e9;
$magenta: #ed1556;
$purple: #6c315a;
$yellow: #feed01;
@content;
}
@if $current_theme == "theme_three" {
$blue: #24215c;
$red: #c72026;
$lightblue: #3482a9;
$pink: #d1615e;
$green: #6bb745;
$brown: #502f37;
$gray: #c8c8c8;
$darkgray: #736e6e;
@content;
}
@if $current_theme == "theme_four" {
$blue: #272363;
$red: #d61e4a;
$lightblue: #2f9ecc;
$pink: #df6763;
$green: #99c34d;
$gray: #c8c8c8;
$darkgray: #736e6e;
@content;
}
}
body {
@include themes {
color: $blue
}
}
I am trying… to use color variables for each different theme but i get this error: Undefined variable: “$blue”.
Can somebody help?