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 Sass Basics (retired) Speeding up Workflow with Sass Creating a Color Palette

Michael Burke
Michael Burke
2,848 Points

Confusing Instructions

anyone confused by the instructions here ... looks like they are asking to create a variable for text color than use the lighten function on tags???

3 Answers

Michael Burke
Michael Burke
2,848 Points

Thanks Eric, i had figured it out, but couldn't remove my comment. I appreciate your reply :)

Erik McClintock
Erik McClintock
45,783 Points

Michael,

The first task may be worded in a slightly confusing manner, but if you break it down as though it were standard CSS that you were writing, you will see what they are after.

Initially, they are asking you to open up a new scope for your styles on the anchor tag, as you would normally in CSS. Within, you are being directed to set the text color property for your anchor tags; again, as you would normally. The difference here being that, since we're using the Sass preprocessor, we have access to more advanced concepts like variables and functions, as we would in a programming language.

In this case (task 1), rather than simply setting the text color to a value like you're used to in CSS (i.e. red, #d5d5d5, rgba(122, 255, 67, 0.5), etc.), you're getting to take advantage of more advanced calculations and a greater level of control right in your stylesheet with the use of the lighten() function from Sass. If you recall, the lighten() function takes two arguments: the first argument is the color that you want to target with the function, and the second argument is the amount that you want to lighten that color by. So, in this instance, since we want to set the color property of our anchor tags equal to the result of lightening the standard color red by 5%, you would want your code to be the following:

a { color: lighten(red, 5%); }

Does that make sense?

Erik

Erik McClintock
Erik McClintock
45,783 Points

That's even better! Hope all is going well - keep at it!

Erik