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

I DONT UNDERSTAND

The following example will work, but using the same name for the argument as the global variable is confusing. How can you make this better?

http://teamtreehouse.com/library/advanced-sass/advanced-variables-mixins-functions-and-placeholders/mixins

3 Answers

Michael Hulet
Michael Hulet
47,912 Points

All you have to do is change the name of the local variable in the Sass mixin the-box to something other than the global variable $default-background-color. This code passes the challenge:

$default-background-color: orange;

@mixin the-box($color: $default-background-color) {
  width: 100%;
  height: 500px;
  border: 1px solid red;
  background-color: $color;
}

#box {
  @include the-box;
}
Kevin Korte
Kevin Korte
28,148 Points

I think I misread read the question. Sorry