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!
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

Szymon Dzumak szymondzumak@hotmail.com
2,689 PointsSass Mixins Bummer -> "The height should be half the size variable."
Code challange - Stage 2 "Variables, Mixins, and Extending"
The height should be half the size variable.
@mixin button($size){ height: $size * 0.5; }
I've got "Bummer". Why ?
Cheers S
4 Answers

Juan Tejerina
3,443 PointsJust a hint:
You use "*" to multiply.
Its asking for a half :)

Matthew Mascioni
20,444 PointsHmm, it seems like the challenge is asking for a bit more than just $size as an argument. Seems like it wants $color, too (unless I'm looking at the wrong challenge) This code worked for me:
@mixin button($color, $size){ height: $size / 2; width: $size; background: $color; }

Juan Tejerina
3,443 PointsBut the whole point of this is to actually understand and help others to understand what is going on instead of giving away the solution...

Matthew Mascioni
20,444 PointsAbsolutely. However, in his case, it seems to be an error in the Code Challenge engine; * 0.5 is the same as / 2.

Szymon Dzumak szymondzumak@hotmail.com
2,689 PointsYeap

Szymon Dzumak szymondzumak@hotmail.com
2,689 Points@Juan And it gets it :) @Matthew Yeach but I just wrote the part where I have a problem. Cheers, $size / 2; works for me but it's the same output as $size * 0,5;