We want to use a ternary expression in SASS.
Approach
The evaluation of the below expression will set $result
to $foreground
.
$property: 'text';
$result: if($property == 'text', '$foreground', '$background');
@debug $result;
We want to use a ternary expression in SASS.
The evaluation of the below expression will set $result
to $foreground
.
$property: 'text';
$result: if($property == 'text', '$foreground', '$background');
@debug $result;