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
There are many benefits to using Sass when building or refactoring responsive layouts. In this video, we'll cover some the ways we can refactor our project's media queries.
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
For instance, we have the handy option of
nesting them,
0:00
inside rules, which keeps media queries
local to their component.
0:01
So let's go over some of the ways we can
refactor our project's media queries.
0:05
So one of the ways we can define media
queries with Sass,
0:10
is creating a layout partial for each
media query.
0:14
And defining them inside their respective
partial files.
0:18
Now one of the benefits of doing that is
that we're able to see the entire set of
0:21
media queries at once.
0:25
But I prefer to nest media queries inside
rule.
0:27
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