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

phillipe Nelson
seal-mask
.a{fill-rule:evenodd;}techdegree
phillipe Nelson
Front End Web Development Techdegree Student 4,823 Points

Task 4 says to reverse the order of the arguments and getting an error that my parameters don't exist.

code: { @mixin square($color: black, $size) { border: 1px solid $color;
width: $size; height: $size; }

.box { @include square($color: red, 50px); }

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

.box {
  @include square($color: red, 50px);
}

2 Answers

Steven Parker
Steven Parker
241,485 Points

When they asked you to "reverse the arguments", they only meant in the include line. It looks like you also changed the mixin definition which is the cause of the message.

You might also need to specify both parameter names when you use the mixin.

Steven Parker
Steven Parker
241,485 Points

phillipe Nelson — you might want to send a note to the Support staff about the instructions.

Glad i could help. You can mark a question solved by choosing a "best answer".
And happy coding!

phillipe Nelson
seal-mask
.a{fill-rule:evenodd;}techdegree
phillipe Nelson
Front End Web Development Techdegree Student 4,823 Points

Yep, that worked. But those instructions were not clear, in my opinion.

"@mixin square($size, $color: black) { width: $size; height: $size; border: 1px solid $color; }

.box { @include square($color: red, $size: 50px); }"

Thank you