Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,842 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,109 Points

I think I misread read the question. Sorry