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

Code challenge: advanced mixin arguments. Task 1.

Task 1 of the final SASS module states:

Create a mixin called "square" that takes two arguments - one called "size" that will set the height and the width, and one called "color" that will set the color of a 1px solid border.

My answer is as follows:

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

The error message I receive says:

Bummer! You should set the border to be 1px wide, and solid.

Any help would be greatly appreciated.

Thanks.

PSA: It's Sass not SASS ... remember only you can prevent over-capitalization

THANKS JAMES, DULY NOTED.

3 Answers

Hai ,

your code should be

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

Thanks Yaswanth.

thx