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
Next, we'll find repeating patterns in our code and extract them into placeholder selectors.
Quick Reference
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
That way, we can reuse bits of code
without creating extra output.
0:00
Now, what's great about placeholder
selectors is that they do not
0:01
compile to CSS unless they're extended or
called up in another rule.
0:05
And when they do output to CSS,
0:10
the result is one grouped selector rule
containing the shared styles.
0:12
So because of that, placeholders or
0:17
extends, as they're sometimes called, are
a smart solution for
0:19
sharing styles between related rule sets,
particularly base styles.
0:22
So when working with placeholder
selectors, I'll usually create an extends
0:28
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