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 CSS to Sass Refactoring with Sass Writing a Mixin for Common Text Patterns

Raúl Barrera C.
Raúl Barrera C.
18,943 Points

Using 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);


@include text(1.625rem, $weight: 200, $color: white);


2 Answers

Rich Donnellan
Rich Donnellan
Treehouse Moderator 27,684 Points

Hey Rau,

Either way works; however, you're redeclaring null for the second argument. This is redundant and should generally be avoided.

Shouldn't it be $white -- not white

Gabbie Metheny
Gabbie Metheny
33,778 Points

white will work, whether or not $white has been declared as a variable, since white is a valid named color in CSS.