Writing and updating CSS can be a repetitive, tedious and arduous task - especially for big projects. CSS preprocessors can help with that - amalgamating related styles and helping you make your style sheets more DRY (Don’t Repeat Yourself).

We have been using CSS Preprocessors for quite some time now - first starting with off with Less and recently moving on to Sass (there is also Stylus as an alternative - but that won’t be covered in this article).

What is a Preprocessor?

A preprocessor allows the front-end developers to be more programmatic when it comes to styling. It allows us to take advantage of things such as functions and variables, to make our css more DRY.

CSS doesn’t natively support these variables or mixins, so we need to use a preprocessor to ‘compile’ the files into browser-readable style sheets. Different processors do it different ways, Sass uses Ruby while Less uses Javascript to compile.

#css #preprocessors #css preprocessors #introduction

An Introduction to CSS Preprocessors
1.15 GEEK