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

I wonder if I am mistaking this?

Hi. I suppose to specify the variable for each argument and tried, but I gave this error message "The mixin should take 2 parameters, '$size' and '$color.". I'm a little confusing about which are arguments, which are variables and which are parameters...

Can anyone please lend me a hand?

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

.box { @include square(red,50px) } ``

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

.box {
  @include square(red,50px)
}

1 Answer

Steven Parker
Steven Parker
229,657 Points

Odd, it looks like you are doing the tasks out of order! The "box" rule isn't mentioned until task 3.

But anyway, task 1 should have given you the message: "Bummer: The mixin should take 2 parameters, '$size' and '$color'." That's a hint that the parameters are not specified in the correct order. — "$size" should come first.