Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Bert Witzel
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Bert Witzel
Front End Web Development Techdegree Graduate 24,585 Points

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.

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