Why you need to start using CSS compilers, and why I think it should be SCSS.

Rebecca Rosenberg
2 min readNov 8, 2020
https://itnext.io/starting-with-sass-116f4ecb682d

As with any programming language, the best way to learn CSS is to just write it. Considering how finicky styling web applications can be, it was particularly frustrating for me to learn during my bootcamp. For understandable reasons, I wasn’t explicitly taught CSS at Flatiron; instead, I learned important computer science fundamentals.

CSS is imperative to web development, however. It’s a major part of the user experience. You don’t want to be serving HTML documents to your user — they aren’t pretty, and, most of the time, they aren’t that accessible either. Styling your web applications should never be considered as an afterthought, something that you do after the functionality of your website is built out. A CSS compiler can make styling feel as important as it always has been.

Without a compiler, coding CSS can be messy and hard to read. The CSS file becomes hundreds, if not thousands, of lines long, only to be separated and organized by comments. With CSS compilers, like SASS, LESS, or SCSS, your styling sheets can be just as modularized as your functional code.

Furthermore, as a React developer, I love the feeling of modularization. Creating separate style sheets for different components makes the code feel more synced up to what it actually looks like on the DOM, and also gives me less headaches. If you aren’t using a CSS compiler yet, you should be. It takes a minute to get the hang of. Believe me, I’m still working through projects and developing my own best practices. But once you get started, your coding life becomes less daunting.

I personally suggest SCSS over SASS. I personally haven’t tried LESS yet, so I can’t comment.

One of the biggest misconceptions of SCSS is that it has more syntactical nuances than SASS. I completely disagree. Whereas SCSS looks and feels more like typing CSS with the curly brackets and semicolons, SASS is dependent entirely upon indentations which are already heavily contested within the programming community.

Switching from CSS to SCSS is an easy, and less daunting, transition. SCSS gives you the flexibility to declare variables, mix-ins, and partials, all while looking like CSS code.

So if you’re dreading styling your web applications, considering learning a CSS compiler — I suggest starting with SCSS.

--

--