Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed CSS to Sass!
You have completed CSS to Sass!
Preview
Sass variables make the repetitive nature of CSS easier to manage because they let us store information that's reused throughout a project. First, we'll create variables for color values in our project.
Color Variables
// Descriptive color variables
$white : #fff;
$black : #000;
$grey : #878787;
$regent-st-blue : #add8e6;
$river-bed : #48525c;
$yellow-orange : #ffa949;
// Functional color variables
$color-border-light : lighten($grey, 35%);
$color-border-dark : $yellow-orange;
$color-link-default : $yellow-orange;
$color-link-visited : $regent-st-blue;
$color-shadow : rgba($black,.8);
$color-body : $white;
Tools
Quick Reference
Related Videos
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
No, Sass isn't gonna take control of your
mind and turn you into a developer.
0:00
But as we've seen, it can change the way
you write CSS.
0:03
Even though Sass does borrow features from
certain programming languages,
0:07
they're only there to make projects easier
to build and maintain.
0:10
Like variables, for instance.
0:13
Earlier, I mentioned how CSS can be
repetitive.
0:15
Well, Sass variables make the repetitive
nature of CSS easier to manage.
0:18
Because they let us store information
that's reused throughout a project.
0:22
Like values for colors, font stacks, media
query break points,
0:26
or any reusable CSS value.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up