When your CSS comes with superpowers that is SASS. Interesting, right?
Yes, WordPress SASS is very interesting and as a new WordPress theme developer you must try WordPress SASS to explore something really useful.
It is all that much like PHP which is basically a preprocessor language that executes a script on the server and creates a HTML output. So also, WordPress SASS processes .scss to create CSS documents that can be utilized by browsers.
Admin area styles of WordPress were ported to use WordPress Sass for development, since version 3.8. There are numerous WordPress theme developers as of now using Sass to accelerate their theme development process.
WordPress SASS Theme Development
According to The SASS Way, Most WordPress theme developers use local theme development environment to deal with their projects before conveying it to a live server or staging situation. Since WordPress SASS is a preprocessor language, you should introduce it on local environment.
Initially thing you have to do is to introduce WordPress SASS.
It can be utilized as an order line tool, yet there are additionally some pleasant GUI Apps accessible for WordPress SASS. You can try Koala, which is a free open source application accessible for Windows, Mac and also Linux.
For the purpose of this article, you should make a clear theme. Essentially make another organizer in/wp-content/themes/. You can name it “SASStheme“or whatever else you need. Inside your clear theme organizer make a new folder and name it templates.
In the templates folder, you have to make a style.scss document utilizing a word processor like Notepad.
Presently you have to open Koala and click on the plus icon. It will help you to add a new project. After that, find your theme index and include it as your new project. You will see that Koala will consequently find the Sass document in your templates catalog and show it.
Right tap on your Sass document and select Set Output Path. Select the root of the WordPress theme registry. For example, /wp-content/templates/mytheme/and hit enter. Koala will now create CSS output in your theme index. To test this you have to open your Sass document style.scss in a content tool such as Notepad and write this code:
You have to save your progressions and do a reversal to Koala. Right tap on Sass document, and sidebar will slide in on the privilege. To incorporate Sass document just tap on the compile button. You will see the outcomes by opening the style.css document in your theme index.
Notice that we have characterized a variable $fonts in the Sass document. Presently at whatever point we have to include text style family we do not have to type the names of the considerable number of fonts once more. We can simply utilize $fonts.
Many professional WordPress theme developer are as of now utilizing SASS. Many developers also say that all CSS will be preprocessed in future, and WordPress developers need to up the game. Tell us what you think about utilizing SASS for the WordPress theme development.