Very promising module but I have one problem.
I have installed live_css with less support. When I make a change I get immediately response to the changes but when I click save the changes will not be saved back to the .less file but to a new file named global.css.lss?mck2p3 in the same directory (the original file was global.css.lss).

CommentFileSizeAuthor
#9 omega_acron_info.txt17.28 KBchrotto
#7 omega_acron.info17.28 KBchrotto
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guybedford’s picture

Status: Active » Closed (works as designed)

LiveCSS only detects 'less' files as having the extension '.less'.

It should work properly if you change the extension.

chrotto’s picture

I have looked at what happens in Firebug and notice the following.
When the file global.css.lss loads it renames so it became global.css.lss?mcm7pf.
I can do changes and notice live what happens to the loaded page but when I save the file it is being saved into the new filename. When I reload the page it load the original .lss file.
The thing after ? changes from time to time. Looks like a random thing.

guybedford’s picture

Ah, Less must be loaded directly into live CSS, with the LESS module and CSS compression turned off. You want to use -

drupal_add_css('style.less');

Not the CSS version - live CSS will alter the less.

Ensure you're reading the instructions exactly. This all works.

guybedford’s picture

Ah, Less must be loaded directly into live CSS, with the LESS module and CSS compression turned off. You want to use -

drupal_add_css('style.less');

Not the CSS version - live CSS will alter the less.

Ensure you're reading the instructions exactly. This all works.

chrotto’s picture

Sorry, but I do not understand this. The documentation says that the Less support should be disabled in Live_css or the less module should be disabled. I have tried both ways and also with both enabled. It work the same in all cases.
In the performance settings all is disabled.
What do you mean with:
You want to use drupal_add_css('style.less');
Not the CSS version

guybedford’s picture

It's difficult to tell what the issue is without knowing your config. Could you send me your theme .info file?

You should have the LESS support enabled in Live CSS, with the file included as a direct LESS file.

If you are using the Drupal LESS module, this should be disabled.

chrotto’s picture

FileSize
17.28 KB

Tthank you for helping me!
Here comes the .info file.

guybedford’s picture

Hmm the .info seems to be blocked by the Drupal server, perhaps rename the extension?

chrotto’s picture

FileSize
17.28 KB

Try again

guybedford’s picture

From the .info file, it seems the file is defined here - settings[alpha_css][global.css] = 'global.css'

This would be a normal css file, without less support. Where was the 'lss' extension coming from or is this a css case now?

chrotto’s picture

My .less file is defined on the lines 35-37

guybedford’s picture

Ok change it to -

css[global.less][name] = 'Your custom global styles'
css[global.less][description] = 'This file holds all the globally active custom CSS of your theme.'
css[global.less][options][weight] = '10'

And change the filename to 'global.less'.

It should also work with 'global.css.less', but I'm not sure.

Less is only detected with the '.less' extension, not '.lss'.

chrotto’s picture

Very sorry about the misspelling!
However now the system totally ignore the global.less file. Probably something I missed.

guybedford’s picture

Ensure that the LESS module (if you're using it), is entirely disabled, and the "LESS Support" for Live CSS is enabled.

Then check to see if the file is being included in the head of the page.

chrotto’s picture

After a while of struggling the page now read the .less file. But now I have to save the Less file and reload the page to see the effects of my editing. Before I saw the effects of my editing directly (but couldn´t save).
Is it supposed to be so?

guybedford’s picture

Less edits live, without saving. Ensure that the LESS module is disabled and LESS support is enabled.

Are there any JavaScript errors on the page?

chrotto’s picture

After some changes forth and back it finally get in place. It now works fine.
Thank you very much fore spending the time on me.

guybedford’s picture

No problem, glad to hear it's working ok now.