DEV Community

Cover image for SCSS v/s CSS! Who takes the Final Jab?
Hrishikesh Mahalle
Hrishikesh Mahalle

Posted on

SCSS v/s CSS! Who takes the Final Jab?

What appeals more fascinating, a wall with just coat plaster or a wall with shades of Paint, and the same goes for the design of House, Buildings, Mobiles and what not. And when it comes to designing a webpage the CSS(Cascading Style Sheets) is the backbone for every Color bit. CSS helps in styling and arranging the HTML code.

But we always have a chance to work with the 'Better alternative' namely SCSS which is subset of CSS. Now although SCSS provides more like a programming feature but has its limitations.

Alt Text

From the Above image we can clearly see that, the repetitiveness is far reduced a lot better, and that's just a single example of many.
Now although SCSS if more like a programing but SCSS variables are determined at the pre-processing stage when SCSS is converted to CSS. Therefore, the se of variables and code re-use is better in performance with SCSS.

Should we opt for CSS from SCSS?

Understanding how the SCSS is to implemented, it gets more and more habituated to use SCSS over CSS since it's efficient to write.

Also with the boom of web application, stylesheets tend to become complex and larger. Thus some handy feature of SCSS like the
CSS isn’t capable of handling flow control rules. SCSS provides @if, @else, @each, $for, and @while flow control rules out of the box.
SCSS supports the standard set of numeric operators for numbers wherein CSS you have to use calc() function for numeric operations. SCSS numeric operations will automatically convert between compatible units.
Thus we can understand that the SCSS is quite useful and shall help to work quit easier while compared to CSS. Hence although CSS is improving, but still has a long way up, before it even reaches the SCSS.

I hope you enjoyed the article. Thanks for reading!

Top comments (0)