Hi
I haven’t used EE in a couple of years and just installed a fresh copy of the latest version.
What I don’t quite understand is this:
How would I compile SCSS or LESS files into CSS?
I can see a bunch of LESS files in the default installation theme that somehow get (or got?) compiled and minified into a file named default.min.css
.
Is this something that EE provides out of the box or will I have to use my own custom solution here, e.g. npm or something similar?
If so what would be the EE way of doing this?
And also: Is LESS some sort of convention within EE or may I use SCSS as well?
Thanks for your help.
ExpressionEngine is front-end agnostic. Meaning when it comes to the HTML, CSS, JS ExpressionEngine doesn’t care. The only thing EE looks for is if you implement any sort of template tag in your HTML asking for it to intervene. So when it comes to compiling your CSS, that entirely handled by whatever method you want to use. You can use LESS, Sass, or any other CSS preprocessor you would like.
Now, that doesn’t mean you can’t write an add-on that could handle this for you if you wanted to. For example, there are add-ons that you can use tags to wrap your CSS and JS files in, and the add-on will minify everything for you. Or one’s like Sassee (last updated for EE2 :/ ) that you could feed Sass files in to and it would compile them for you.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.