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 trialjytutdokdq
Courses Plus Student 13,285 PointsBummer! The color should be set to red?
I'm trying to create and if/else statement that will affect my <a>
tages. But something's wrong... I keep getting an error message that says "the color should be set to red". I know I'm missing something, but I'm not sure what it is. Any advice?
Here's my code:
$time: morning;
a {
@if $time == morning {
color:red;
} @else if $time == afternoon {
color:blue;
} @else {
color:grey;
}
}
1 Answer
Michael Pare
6,358 PointsPossibly a bug? Your exact code produces the correct results on Codepen
Dave Evans
13,160 PointsDave Evans
13,160 PointsI agree, I copied and pasted your exact code into the challenge and it was accepted.
jytutdokdq
Courses Plus Student 13,285 Pointsjytutdokdq
Courses Plus Student 13,285 PointsTHANK YOU. I thought I was going crazy. I'll try the exercise in a different browser.