Sass

Sass
Sass is a preprocessor scripting language that compiles into CSS. It gives developers tools
that allow them to create more efficient CSS.
The pros for using Sass are as follows:
• Large toolset: Sass contains a bundle of powerful tools that you can’t utilize in
vanilla CSS. While we won’t be covering these in detail, these include tools like
mixins, loops, functions, and imports that can be used to create more powerful
and performant CSS for your application. This is a huge pro for Sass.
• Modules: You can split your Sass into separate .scss files to break down files.
You can then import them into one another as needed. This drastically helps
improve the organization of your code.
30 Styling Choices and Creating Reusable Layouts
• Freedom: Sass enforces a convention of how to write it – you can choose. This
means that you can choose a style that suits your team.
The cons for using Sass are as follows:
• Skip foundations: Freedom can also be a negative for developers new to styling.
If you haven’t used Sass before, you may create code that works but in a way that
is overly complicated. This can lead to future developers struggling with the code.
Concrete CSS guidelines can help avoid this misuse.
• Naming conventions: Naming every class you create for every element you style is
a tedious process. There are methodologies that can help you create sensible class
names; however it still takes a long time.
• Two sources of truth: When you write your HTML, you probably will also add class
names to your elements to style them. You then jump across to your Sass file to add
these class names, only to forget what names you had for them. Jumping back and
forth between your HTML and Sass can be an annoying context switch. You might
consider abstracting styles away from your markup to be a good thing, but when
markup and styles are so interconnected, this can be an inconvenience.
Although Sass is a powerhouse, increased power does also mean increased complexity.
While the learning curve may be higher for beginners, gaining control of it will give you
a great deal of freedom.

close

Stay Connected

We don’t spam! Read our privacy policy for more info.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart