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 trialSarah Park
1,857 PointsConsole errors on different type of quotes
I get an error with:
background-image: url('#{$color}.png');
Because the console doesn't accept single quotes in this challenge (and replacing the single quotes with double corrects the error).
(I know this isn't really a discussion, but rather a bug report – is there another place where I could report any potential bugs?)
2 Answers
James Barnett
39,199 PointsI think you are right, that is this an issue with in the code challenge correctness check.
When I put in this Sass into codepen
@mixin cars ($color){ background-image: url('#{$color}.png'); }
.myClass { @include cars(blue); }
I get this CSS:
.myClass { background-image: url("blue.png"); }
Since both Codepen & SassMeister compile the Sass into valid CSS, I'd say code challenge engine is being overly strict here.
demo: http://codepen.io/jamesbarnett/pen/jFynJ/?editors=010
tip: In codepen you can click the eye to see a "compile preview" for preprocessors.
Adam Sackfield
Courses Plus Student 19,663 PointsI think it's just how that string interpolation (#{}) works as I noticed in Rails it doesn't work with single quotes. So I don't actually think its a bug
James Barnett
39,199 Points>
I think it's just how that string interpolation
I don't think so, see my post.
Adam Sackfield
Courses Plus Student 19,663 PointsYou are correct it must be an error in the code engine. Are you going to fire off an email to TTH or me or the OP?
Sarah Park
1,857 PointsI'll send an email – thanks for the quick responses!
James Barnett
39,199 PointsJames Barnett
39,199 Points>
is there another place where I could report any potential bugsEmail them to help@teamtreehouse.com