I was trying to add theme changing property in my react website, for that i used this method in scss file:`
$themes: (
light: (
textColor: #000,
bg: white,
logo: darkblue,
bgSoft: #f6f3f3,
textColorSoft: #555,
border: lightgray,
),
dark: (
textColor: whitesmoke,
bg: #222,
logo: white,
bgSoft: #333,
textColorSoft: lightgray,
border: #444,
),
);
@mixin themify($themes) {
@each $theme, $map in $themes {
.theme-#{$theme} & {
$theme-map: () !global;
@each $key, $submap in $map {
$value: map-get(map-get($themes, $theme), "#{$key}");
$theme-map: map-merge(
$theme-map,
(
$key: $value,
)
) !global;
}
@content;
$theme-map: null !global;
}
}
}
@function themed($key) {
@return map-get($theme-map, $key);
}
`
and then when i was trying to use this it was showing an error: Terminal photo of error
I don't understand why this is happening, please provide a solution as soon as possible.