Sustainable SCSS
Learn about the best Sass practices such as partial files, placeholders and @import.
StartSustainable SCSS
Lesson 1 of 1
- 1Sass can be confusing if it’s not organized correctly. In this unit, we will dive into the language’s best practices. From file organization, to understanding when is best to include a mixin or e…
- 2We’ll start with best practices for organizing files. As your web app or web page grows in complexity, so will the styles that go along with it. It’s best to keep code organized.
- 3In addition to having a solid file structure, a big part of staying organized is splitting up the logic into smaller manageable components. Sass extends the existing CSS @import rule to allow incl…
- 4Partials in Sass are the files you split up to organize specific functionality in the codebase. * They use a _ prefix notation in the file name that tells Sass to hold off on compiling the file…
- 6Sometimes, you may create classes solely for the purpose of extending them and never actually use them inside your HTML. Sass anticipated this and allows for a special type of selector called a *…
- 7Sweet! Recall that mixins, unlike extended selectors, insert the code inside the selector’s rules wherever they are included, only including “original” code if they are assigning a new value to the…
- 8* Sustainability is key in Sass, planning out the structure of your files and sticking to naming conventions for both variables, mixins, and selectors can reduce complexity. * Understanding **…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory