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 trialGareth Partridge
13,421 PointsSwitch the order of the square arguments. Be sure to specify the variable for each argument.
I am not sure what needs to be switched exactly ? please help
@mixin square($size, $color:black) {
height: $size;
width: $size;
border: 1px solid $color;
}
.box{
@include square($color, $size);
}
1 Answer
Steven Parker
231,184 PointsYou're close. You've named the arguments in the switched order, but you still need the values to go with them.
Gareth Partridge
13,421 PointsGareth Partridge
13,421 PointsHi Steven
sorry but what are the values ?
Jamie Reardon
Treehouse Project ReviewerJamie Reardon
Treehouse Project ReviewerHe means you need to also switch the values (which are ones in the parenthesis of your box include rule.
Steven Parker
231,184 PointsSteven Parker
231,184 PointsThe values that the challenge instructions ask for are "red" for the color and "20px" for the size.
I'd guess they were there when you passed task 1 but got removed?
Gareth Partridge
13,421 PointsGareth Partridge
13,421 PointsHi Steven
the values were not in the first question, thats also confusing me a bit.
.box { @include square($color, $size: 50px red); }
.box { @include square($color, $size: red 50px); }
I have tried putting the values everywhere and I keep getting the same error, I have re watched the video a few times as well, I must be complicating these functions somewhere.
Steven Parker
231,184 PointsSteven Parker
231,184 PointsThe values need to be individually paired with the names:
.box { @include square($color:red, $size:50px); }
Gareth Partridge
13,421 PointsGareth Partridge
13,421 PointsThanks, I see now how obvious it was. I will have to give these functions more practice.