I am currently using LESS in an Omega Sub-theme. I have been experiencing issues with CSS caching enabled and LESS developer mode disabled. What I have experienced is the failure for LESS to regenerate CSS files once I have cleared the cache resulting in difficulties flushing LESS files via the UI.

Here is what I have found to remedies the issue.

1st Clear the Cache
2nd Click "Flush LESS Files" on LESS configuration page (this page has to be open before the cache is cleared)

I would like to see LESS build upon the drush cc css-js command by flushing LESS files just after.

Comments

chrisjlee’s picture

I would agree. It can be frustrating trying to rebuild the files each time.

corey.aufang’s picture

Since you're using omega, are you using the method here to reference your files?

#928292-10: Use LESS or other CSS preprocessor

doostinharrell’s picture

Yes I am and it works fairly well however I have encountered the following:

http://drupal.org/node/1627478

corey.aufang’s picture

Category: feature » support

I have tested this with the latest release version the LESS module (7.x-2.6 at time of writing) with both CSS aggregation enabled and LESS developer mode disabled.

I have a Omega sub-theme spawned from Omega 7.x-3.1 which has a .less file referenced using the method outlined here.

When using the generic cache flush, LESS files are being correctly regenerated and included in the aggregate.

I don't think the issue resides with either LESS or Omega, so if you could provide any further information it would be helpful.

corey.aufang’s picture

Woops, I had an oversight as to the issue.

You can actually flush LESS in drush with 'drush cc less'. This command is already present in the current release version of LESS (7.x-2.6 at time of writing).

I don't believe there is a way for me to hook into the 'css-js' drush cache clear command, but if you flush LESS it will cause new aggregates to be generated since the included LESS files will now be at a different path.

colan’s picture

Status: Active » Closed (duplicate)

Marking as a duplicate of #1163900: Drush integration.