Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Breaking the Style Sheet into Partials 7:35
- Finishing and Importing our Partials 6:17
- Placeholder Selectors 10:59
- Nesting Selectors 5:22
- Color Variables 8:34
- Font Stack and Asset Variables 6:44
- Reusing Code with Mixins 6:57
- Writing a Mixin for Common Text Patterns 6:45
- Defining Media Queries 8:13
- Refactoring with Sass Review 7 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
With Sass, we're able to nest selectors in the same visual hierarchy of our HTML. In this video, we'll look for areas in our code where it makes sense to nest rules.
When does it make sense to nest selectors?
When working with namespaced selectors:
.main {
&-heading {
...
}
&-title {
...
}
}
When/if the nested selectors rely on the parent's context. Navigations, for example:
.main-nav {
...
li {
...
}
a {
...
}
}
Quick Reference
Related Videos
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
James Barrett
13,253 Points1 Answer
-
Aurelian Spodarec
10,801 Points1 Answer
-
Erik Nuber
20,629 Points0 Answers
-
PLUS
Antonio Martinez
Courses Plus Student 14,457 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
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