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 trialRadha Krishna
4,615 PointsNot sure why $color:red is not accepted and throwing error instead
When declaring .box class, I did include the square mixin and passed necessary attributes. Bit puzzled why and what mistake i have made
@mixin square($size, $color: black){
$height: $size;
$width: $size;
$border: 1px solid $color;
}
.box{
@include square($size:50px,$color:red);
}
2 Answers
Luke Pettway
16,593 PointsRemove the dollar sign $ from each of the properties in the mixin, they should look like this:
height: $size;
width: $size;
border: 1px solid $color;
Radha Krishna
4,615 PointsOh, silly me. Thank you for pointing out