SCSS File
$dark-theme: false!default;
$primary-dark: blue;
[dark-mode='dark'] {
background:gray!important;
$dark-theme: true!global;
}
[dark-mode='light'] {
background:yellow!important;
$dark-theme: false!global;
}
@if $dark-theme==true{
$primary-dark: black!global;
} @else{
$primary-dark: blue!global;
}
HTML
<html>
<body dark-mode="dark">
</body>
</html>
The above code always sets $dark-theme value given in [dark-mode='light']
while background is set correctly