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 trialblake littleton
14,255 PointsPassing color values?
I'm having trouble with the last part of this code challenge ..I'm stuck , I put it the color value inside the button rule. I tried the @include rule to but it did not work. Any suggestions?
$btn-background: #dc143c;
/* Write your SCSS code below. */
@mixin button{
font-size:1.25em;
background-color:$btn-background;
@content;
$colorvalue:#f0f8ff;
}
a{
font-size:1.25em;
background-color:$btn-background;
}
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Blake,
You just got a bit off track, but also I think the code checker passing Task 2 for you when it shouldn't have may be leading to some of you confusion.
Task 2 asks you to include
the button mixin for the <a> tags, but you have the rules hard-coded instead of using @include
, which the challenge should have given a "Bummer!" instead of passing (Tagging Guil Hernandez to have a look at Task #2).
So, then in Task 4, the instructions say to add the color rule to the "button include" for the <a> tags. Here you just want to do
color: #f0f8ff;
which would go after the @include
. Instead, you are creating a variable to hold a color value. So, that needs to be changed, and the actual rule needs to be moved out of the mixin and into the <a> tag rules.
I hope this helps. :)
Keep Coding!