For any web developer, the word CSS is not something new. Despite the fact that CSS is an awesome programming/styling language, it comes with certain limitations which cannot be ignored. Thankfully, the CSS preprocessor languages like Syntactically Awesome Syle Sheets (Sass) and LESS have saved the day. In today’s post, I’m going to explain how you can use Sass with WordPress through NPM Scripts and provide you with an easy to use boilerplate. Let’s start with the basics. What is Sass? Sass is a CSS preprocessor language that helps developers write CSS in a better and more meaningful way. With Sass, you can integrate with features CSS does not support. These include basic math operators, mixins, nesting, variables, etc. Imagine using variables in CSS, for font-size, or theme colors. Sass makes that easy. How Does Sass Works? Being a preprocessor language, Sass performs a similar function like any such language would do. E.g. PHP preprocesses a script and generates an HTML output. So, Sass preprocesses .scss files and generates .css files as a result. Now your CSS files can be rendered by any browser. This part remains the same while using Sass. However, the difference
Share This