Redux and SASS
If you’re wondering what this means, please use the provided links which will open information pages in new windows. This article won’t cover the finer points and debates between SASS and LESS. That’s fodder for a completely different article. 🙂
By default Redux now compiles all active field and extension CSS into a single file using the SASS (Syntactically Awesome Stylesheets) compiler. When we say ‘active’ fields, we mean only fields actually in use. This, in theory, should speed things up a bit not only be combining only the required CSS into a central file, but by eliminating the need for the enqueuing of multiple CSS files.
We’re asking all the Redux aficionados out there to download the latest Redux version for our Github and give the new code a spin. Should glitches or bugs be found, please report them to us. We’d like to get this new code base ironed out for official release by the new year.
There’s nothing you need to do special to test out the new code. Download, install and go! That said, we’ve included a new argument array within Redux to deal with specific settings for the SASS compiler. Consider the following:
These are the defaults set in the Redux core, and argument you could (but don’t need to) add to the arguments array in your Redux configuration file (within the setArguments() function).
The enabled argument enabled or disables the SASS compiler. We at Team Redux enjoy giving our devs the option to enable or disable features as desired. Setting this argument to false will disable the SASS compiler. All CSS will then be enqueued separately, just as we’ve done for so long before adding the SASS compiler option.
The page_output determines where the SASS compiler output is place. By default, this option is set to false. This mean all CSS output is placed into a singular file and placed in the WordPress upload folder. Setting this argument to true will output the SASS compiled CSS directly into the page itself, in a style tag.
We here as Team Redux hope you enjoy the new benefits of the SASS compiler in our ever evolving options framework. Please feel free to leave your comments below!