Home › Forums › CSS › [Solved] SCSS Change Variable depending on parent class › Reply To: SCSS Change Variable depending on parent class
October 18, 2013 at 12:24 pm
#153452
Alen
Participant
$base-color: red;
.el{
background-color: $base-color;
}
.ex{
@if $base-color == red {
$base-color: green;
background-color: $base-color;
}
}
Compiles to:
.el {
background-color: red; }
.ex {
background-color: green; }