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 trialRaúl Barrera C.
18,943 PointsUsing null on arguments list
Hi, I used null
value on mixin arguments list and it works.
Is this correct or is best list the next argument?
@include text(1.625rem, null, 200, white);
or
@include text(1.625rem, $weight: 200, $color: white);
Thanks
2 Answers
Rich Donnellan
Treehouse Moderator 27,708 PointsHey Rau,
Either way works; however, you're redeclaring null
for the second argument. This is redundant and should generally be avoided.
bill curry
Front End Web Development Techdegree Student 7,841 PointsShouldn't it be $white -- not white
Gabbie Metheny
33,778 Pointswhite
will work, whether or not $white
has been declared as a variable, since white
is a valid named color in CSS.
Raúl Barrera C.
18,943 PointsRaúl Barrera C.
18,943 PointsThanks