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

How do I include the border mixin in the include rule?

I dont know how to include the border mixin into the include rule. I cant figure out what works for this. please help!

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


.box @include square(){ 
border ($size, $color){


    }
  }
}

3 Answers

Hi Ja'Quan, here is my final solution to the challenge:

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

The $size and $color are placeholders, so for the @include in .box you have to declare the values. Then they ask you to switch them around so you have to write as I did above, otheriwse you could just write @include square(50px, red). Hope that helps, let me know if I can explain further.

Hello, you have to put the @include inside the curly braces for .box:

.box { 
@include square();
}

It says that my box should have a red border and asks if I included the square Nixon correctly

Thank you! I had to screenshot that to reference back to it because I just couldn’t understand it the way the course was explaining it