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 Advanced Sass Advanced Variables, Mixins, Functions, and Placeholders List-maps and Nesting

Christopher Borchert
Christopher Borchert
14,814 Points

Error on listmap quiz in Advanced Sass Course

I think that this needs to be fixed. It's a t/f question:

"The following variable references are exactly the same:

  1. $input-disabled-background:
  2. map-get($input, disabled-background);"

Should the colon after the first list item be a semicolon?

1 Answer

Christopher,

The colon is meant to be there since you are declaring a variable. In CSS you declare a variable using the variable name, followed by a colon, and then the value of the variable. The quiz question only uses part of the declaration as it's asking if using the variable by name is the same as using the function map-get.

$input-disabled-background: #CCC;

Cheers!

Christopher Borchert
Christopher Borchert
14,814 Points

Thanks for the quick response.

I assumed since the question was about referencing a variable rather than assigning it a value, that I could expect to see a reference in both of the items.

I still think that both of the options should be complete lines of code (ending in a semicolon) since the question asks about whether the two are the exact same. Since the answer is the same in either case, I guess it doesn't matter much though. It was just confusing to me as a user.

-C