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 trialAndrew Shipley
7,781 PointsWrite a mixin called "cars" with two variables named "make" and "color".
Hello,
I am stuck on this one, can anyone tell me the right code please?
Thanks!
1 Answer
Ken Alger
Treehouse TeacherAndrew;
The general convention for SASS mixin with two variable is:
@mixin name($var1, $var2) {}
I'm not sure on which challenge you are working, but given what you stated in your post title I would create that mixin thusly;
@mixin cars($make, $color) {}
Inside the mixin you can then define what happens with the passed in data.
Post back if you are still stuck and with the code you are using.
Ken
Andrew Shipley
7,781 PointsAndrew Shipley
7,781 PointsThanks a lot Ken, it worked. Was missing the curly braces at the end.