This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Sylvert
Sylvert

I try with this {{ ['assets/sass/theme.scss']|theme }} in the layout but has an error Error: An exception has been thrown during the rendering of a template ("Invalid argument supplied for foreach()").

how is the right way to put or compile sass files?

Art and Code Studio
Art and Code Studio

+1

There are any plans to support SASS?

DMeganoski
DMeganoski

as far as I know, this is not supported for less files, either. You have to compile them yourself, and include the output css file in your theme.

There are many ways to handle the compiling, from what I understand. Personally, I've been using gulp to compile my less files.

alex11628
alex11628

DMeganoski LESS is definitely supported out of the box. You just have to link up your .less file instead of the compiled .css file in your template. However, depending on which file you're working on, you may need to re-save the root .less (usually theme.less) file for it to pick up the changes and recompile on next page refresh.

daftspunky
daftspunky

Try the SCSS plugin found here

Last updated

DMeganoski
DMeganoski

Ah, I had not seen that done yet and had not tried it myself. Good to know.

My next question would have been if it compiles the files on every page load, which would be rather redundant, but seeing as you pointed out you need to make a change to the file to get it to refresh I suppose that answers that question.

That could be much easier than having to run a gulp task after every change when developing.

Still, personally I think I would prefer to do the compiling myself for a final product.

BenjaVR
BenjaVR

daftspunk said:

Try the SCSS plugin found here

The plugin is removed?

LookAgency
LookAgency

@BenjaVR Support is now integrated into core, update and make sure this is in your config/cms.php:

/*
    |--------------------------------------------------------------------------
    | Check import timestamps when combining assets
    |--------------------------------------------------------------------------
    |
    | If deep hashing is enabled, the combiner cache will be reset when a change
    | is detected on imported files, in addition to those referenced directly.
    | This will cause slower page performance. If set to null, assets are
    | minified, when debug mode (app.debug) is disabled.
    |
    */

    'enableAssetDeepHashing' => true,
BenjaVR
BenjaVR

LookAgency said:

@BenjaVR Support is now integrated into core, update and make sure this is in your config/cms.php:

/*
   |--------------------------------------------------------------------------
   | Check import timestamps when combining assets
   |--------------------------------------------------------------------------
   |
   | If deep hashing is enabled, the combiner cache will be reset when a change
   | is detected on imported files, in addition to those referenced directly.
   | This will cause slower page performance. If set to null, assets are
   | minified, when debug mode (app.debug) is disabled.
   |
   */

   'enableAssetDeepHashing' => true,

Thanks!

1-9 of 9

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.