Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#9 | omega_acron_info.txt | 17.28 KB | chrotto |
#7 | omega_acron.info | 17.28 KB | chrotto |
Comments
Comment #1
guybedford CreditAttribution: guybedford commentedLiveCSS only detects 'less' files as having the extension '.less'.
It should work properly if you change the extension.
Comment #2
chrotto CreditAttribution: chrotto commentedI 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.
Comment #3
guybedford CreditAttribution: guybedford commentedAh, 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.
Comment #4
guybedford CreditAttribution: guybedford commentedAh, 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.
Comment #5
chrotto CreditAttribution: chrotto commentedSorry, 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
Comment #6
guybedford CreditAttribution: guybedford commentedIt'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.
Comment #7
chrotto CreditAttribution: chrotto commentedTthank you for helping me!
Here comes the .info file.
Comment #8
guybedford CreditAttribution: guybedford commentedHmm the .info seems to be blocked by the Drupal server, perhaps rename the extension?
Comment #9
chrotto CreditAttribution: chrotto commentedTry again
Comment #10
guybedford CreditAttribution: guybedford commentedFrom 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?
Comment #11
chrotto CreditAttribution: chrotto commentedMy .less file is defined on the lines 35-37
Comment #12
guybedford CreditAttribution: guybedford commentedOk 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'.
Comment #13
chrotto CreditAttribution: chrotto commentedVery sorry about the misspelling!
However now the system totally ignore the global.less file. Probably something I missed.
Comment #14
guybedford CreditAttribution: guybedford commentedEnsure 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.
Comment #15
chrotto CreditAttribution: chrotto commentedAfter 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?
Comment #16
guybedford CreditAttribution: guybedford commentedLess edits live, without saving. Ensure that the LESS module is disabled and LESS support is enabled.
Are there any JavaScript errors on the page?
Comment #17
chrotto CreditAttribution: chrotto commentedAfter some changes forth and back it finally get in place. It now works fine.
Thank you very much fore spending the time on me.
Comment #18
guybedford CreditAttribution: guybedford commentedNo problem, glad to hear it's working ok now.