Back Hamza Tamenaoul's blog

My experience with Sass

When reading about sass in blog posts, I saw a lot of people excited about all the features he offers. A long ago I have decided to give it a shot, give him an opportunity to see if by any chance he can solve some of my problems when writing CSS. This is my experience overview.

My main problem when writing CSS, was the difficulty of keeping everything organized, especially when the “style.css” file easily passes the thousand line mark. That quickly made me a fan of two of Sass’s features: the import feature and the nesting feature. It gave me the ability to slice my CSS into smaller, clean, more organized chunks of code. When designing a website, I like to make in the form of a collection of independent blocks. With the help of Sass, my SCSS files quickly reflected this organization, and this made the maintenance of the code simple, and finding where to make a modification hustle, quickly became a thing of the past.

As for the mixins, they are useful but not as much as the auto-prefixing extensions available for VS Code or Sublime text. What I didn’t find useful tho, is the inheritance. I am not saying that it’s a bad feature, but I am used to putting the CSS properties I will be reusing in a lot of classes in a class of their own and then I simply add them to the elements. This is a way of writing CSS I got used to since it gives me much more control later when working with Javascript.

Sass gives a new way of writing CSS, a more simple and exciting way. It’s very useful and I think that it should be recommended to everyone, no matter the level of their web development skills.

Contact me by mail © 2018 - 2019