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 Add Reusable Logic to Your Sass Advanced Mixins Challenge

Gareth Partridge
Gareth Partridge
13,421 Points

Switch 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

style.scss
@mixin square($size, $color:black) {
  height: $size;
  width: $size;
  border: 1px solid $color;
}
.box{
  @include square($color, $size);
}

1 Answer

Steven Parker
Steven Parker
231,275 Points

You're close. You've named the arguments in the switched order, but you still need the values to go with them.

Gareth Partridge
Gareth Partridge
13,421 Points

Hi Steven

sorry but what are the values ?

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

He means you need to also switch the values (which are ones in the parenthesis of your box include rule.

Steven Parker
Steven Parker
231,275 Points

The 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
Gareth Partridge
13,421 Points

Hi 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
Steven Parker
231,275 Points

The values need to be individually paired with the names:

.box { @include square($color:red, $size:50px); }
Gareth Partridge
Gareth Partridge
13,421 Points

Thanks, I see now how obvious it was. I will have to give these functions more practice.