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

Stephen Blank
Stephen Blank
16,286 Points

Question about Sass variables

Looking through the Foundation documentation, I see that some of their variables have a second value called !default. What is the purpose of this second value, and what does it do?

$topbar-bg-color: $oil !default;
$topbar-bg: $topbar-bg-color !default;

1 Answer

If before this code someone has defined those variables before it won't change them...

see the official reference for more information :) http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_defaults_

your welcome mate :)