Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Sass Basics (retired) Advanced Sass Concepts Interpolating and if/else

Corwyn Wilkey
Corwyn Wilkey
7,971 Points

Need help with the if/else statement...

My code looks like this.

@mixin cars ($make, $color) { 
    .#{$make} {
        border: 1px solid black;
    background-image: url("#{$color}.png");
    }
}
$time: morning;
a {
    @if "$time == morning { $color: red; }"
  @else if "$time == afternoon { $color: blue; }"
  @else { $color: grey; }
}

I'm trying to figure out the last task on this challenge, with the if/else statement. I can't figure out what's wrong...

Corwyn Wilkey
Corwyn Wilkey
7,971 Points

Durpdie durp... never mind. I figured it out. lose the "" and the $ in the if/else portion.