Less and SASS together?


Before I embark on creating my first site in 5.7, am I going to run into problems using SASS (scss) in tandem with LESS? From what I understand, the only time that I'll encounter LESS is if I start using theme customisation, which is not really an issue for me right now. Is that the case?

Many thanks

View Replies: View Best Answer
mesuva replied on at Permalink Best Answer Reply
This shouldn't be a problem, we're currently using both Sass and LESS on a theme as you've described with no issues.

It really just generates two seperate styelsheets. The relevent lines in our header.php file look like this:
<link rel="stylesheet" href="<?php echo $this->getThemePath() . '/main.css';?>">
<link href="<?=$view->getStylesheet('customisations.less')?>" rel='stylesheet' type='text/css'>

In this case our main.css file is generated via Sass (compiled by Codekit or the command line), and the customisations.less file gets processed by concrete5's compiler.
boonier replied on at Permalink Reply
Great thanks, that confirms exactly what I thought!

Responsive replied on at Permalink Reply

Is there any way to Compile Sass on the server or should we continue at the moment to compile Sass locally and deploy the compiled CSS.
MrKDilkington replied on at Permalink Reply

Currently concrete5 only compiles Less on the server.
JohntheFish replied on at Permalink Reply
SASS compilers tend to be heavier processing than LESS. Those I have seen attempted to be build into addons have suffered resource issues on SASS files considerably less complex than the average theme.

Obviously where the resource usage line is crossed depends on your site host. With high performance hosts, you could be OK. With cheap shared hosting, look forward to apache/server errors.

Hopefully Bootstrap's move to SASS will stimulate a burst of compiler development to get them more efficient.
Mainio replied on at Permalink Reply
If someone is still interested in compiling Sass (specifically SCSS) on the server side, we have implemented an installable concrete5 package for this purpose:

It allows the developers to use any preprocessor there is to write their CSS. And it all works within concrete5 without any external tools. It also allows developers to use preprocessors for JS in case they need to use them (e.g. CoffeeScript).

We would love to hear some feedback on this package! Possible bug reports can be directly reported into the GitHub repository's issues.

We are also hoping to get these features integrated into the core. If you have some thoughts on this, feel free to share them at this related GitHub issue: