This is a valid sass code.
$dark-theme: true !default;
$primary-color: #f8bbd0 !default;
$accent-color: #6a1b9a !default;
@if $dark-theme {
$primary-color: darken($primary-color, 60%);
$accent-color: lighten($accent-color, 60%);
}
.button {
background-color: $primary-color;
border: 1px solid $accent-color;
border-radius: 3px;
}
So, it is possible to change variables based upon conditions. But, how do we update these variables from the frontend? I want to change the value of $dark-theme to false on a press of a button in the frontend? Is it possible to do so? How?