Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Architecting Scalable and Maintainable Sass

Architecting Scalable and Maintainable Sass

Stylesheets are everywhere on the web and they keep growing. In this talk, we'll explore how to use the Sass precessor, to write stylesheets that are highly maintainable and scalable so the next developer who takes over the project won't have to pull their hair apart in frustration.

Linda Ikechukwu

June 12, 2020
Tweet

More Decks by Linda Ikechukwu

Other Decks in Technology

Transcript

  1. • base/ • components/ • layout/* • pages/ • themes/*

    • helpers/ • vendors/* • main.scss The 7-1 folder pattern
  2. “Naming things is one of the hardest things to do

    so put more thought and effort into it”
  3. //NOT OKAY .wavy-dropdown-button //OKAY .dropdown-button Tips for naming things! Use

    fully descriptive words but limit it to two words if possible.
  4. //NOT OKAY .wavy-dropdown-button //OKAY .dropdown-button //OKAY //OKAY $red-color $secondary-color Tips

    for naming things! Use fully descriptive words but limit it to two words if possible. Name things based on their function, not appearance.
  5. //NOT OKAY .wavy-dropdown-button //OKAY .dropdown-button //OKAY //OKAY $red-color $secondary-color //NOT

    OKAY .sample-projects__title //OKAY .sampleProjects__title Tips for naming things! Use fully descriptive words but limit it to two words if possible. Name things based on their function, not appearance. Go camelCased for block level multi word names to avoid extra dashes.
  6. //NOT OKAY .wavy-dropdown-button //OKAY .dropdown-button //OKAY //OKAY $red-color $secondary-color //NOT

    OKAY .sample-projects__title //OKAY .sampleProjects__title Tips for naming things! Use fully descriptive words but limit it to two words if possible. Name things based on their function, not appearance. Go camelCased for block level multi word names to avoid extra dashes. Avoid abbreviations. Exceptions- nav, btn, cta .. //NOT OKAY //OKAY .r-builder .rocketBuilder
  7. “Any variables/ mixins/ function that will only be used in

    a particular component should be locally scoped to it”
  8. • Is Sass Worth Learning in 2020 - Tom Ray

    • Learn Sass in 20 minutes| Sass crash course - Dev Ed • The Official Sass Documentation • BEM 101 - Robin Rendle • Architecture for a Sass Project - Hugo Giraudel • Sass tutorial: A first look at writing more maintainable styles - Ollie • Writing maintainable SCSS - Michael Flores Further Reading!