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 trialDavid Moorhead
18,005 PointsYour help is appreciated for a SASS @function that's beyond my scope in Task 4 of 4.
Here are the instructions for Challenge Task 4 of 4. Thank You for helping.
Switch the order of the square arguments. Be sure to specify the variable for each argument.
@mixin square ($color: black, $size) {
border: 1px solid $color;
height: $size;
width: $size;
}
.box { @include square(red, 50px); }
/*-- the bummer read: The mixin should take 2 parameters, '$size' and '$color'.
This is the answer that passed Task 3 of 4:
@mixin square ($size, $color: black) {
height: $size;
width: $size;
border: 1px solid $color;
}
.box { @include square(50px, red); } --*/
2 Answers
trio-group I.AM
25,713 PointsHi David,
I feel like the instructions are confusing you a little bit. You have switched the order of the parameters in the mixin but you are actually supposed to switch the order of the arguments you are passing in your @include.
Fix the mixin (use the code that passed before) and only switch the order of your arguments. Of course, in order for the code to work properly you need to tell the mixin that you are passing color first and then size ("Be sure to specify the variable for each argument").
Hope this helps.
Brandon Gault
Front End Web Development Techdegree Graduate 17,539 PointsI've been stuck on this challenge (4/4) all day and have tried everything I can think of to get it to work to no avail. Please help.
David Moorhead
18,005 PointsDavid Moorhead
18,005 PointsTHANK YOU, trio interactive! What you wrote here was an understatement. :)
It will take me still more study and practice to understand SASS, that is, beyond a certain point.
David