We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Is there a standard way to compile SCSS or LESS files into CSS in EE?

How Do I?

Tintin81's avatar
Tintin81
116 posts
4 years ago
Tintin81's avatar Tintin81

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.

       
Andy McCormick's avatar
Andy McCormick
183 posts
4 years ago
Andy McCormick's avatar Andy McCormick

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.