I am a very big fan of this module and using it for quite a long time.

Just want to report that background disappears when we start editing the css through live css module. I have been facing this issue since I have started using this module. There have been several updates to this module but this issue not resolved therefore I am bringing it to your notice.

Comments

deryck.henson’s picture

Is this background using images or just colors?

fahadurrehman’s picture

background:#000; works fine
background:url("../images/image.jpg"); image disappears & backgound gets white when we start editing through live css
background:url("../images/image.jpg") #000; image disappears & backgound gets white when we start editing through live css

once we start editing css all the instances using background image gets blank. But after saving the css when we refresh the page they appears back. I have tested it on firefox and google chrome.

One thing forget to add is that I am using this with Omega theme for long time so I don't rememebr if it works fine without omega theme or not.

deryck.henson’s picture

Well I can tell you Omega theme is not the culprit and this is a longstanding issue (referenced here as well). I'm going to use this issue as the primary source though, since the other one is also mentioning an unrelated problem.

I'm going to look into this and get back to you.

deryck.henson’s picture

Assigned: Unassigned » deryck.henson

When using:

background: url(/path/to/image);

vs.

background: url("/path/to/image");

the background is not eliminated. This should not happen and I will keep looking into why it is.

In the meantime, you may format your CSS without quotes when referencing url() files as this is still able to parse as well.

PS - this happens to any url(). My guess is it is an ace.js error. More to come.

guybedford’s picture

Status: Active » Fixed

Thanks for the help in narrowing this down. I believe I've fixed the issue now in the 7.x-2.x and 8.x-1.x dev branches.

@deryck.henson could you test this and confirm it is working ok for you as well now?

Then we can push out the 7.x-2.12 release when this is confirmed your side.

deryck.henson’s picture

Definitely, I'll check when I'm home. In the meantime I wanted to offer an extra solution to supplement this one (more of a feature/improvement).

Even if the backgrounds are loaded properly, the way the javascript is setup will result in a reload of each image included with url() on every keystroke. Maybe we could put a small cache for each of these upon initial page load and on each keystroke/refresh, the page would use the cached version. We can add a button on top to do an instant clear cache in case the image files are changed on the server.

fahadurrehman’s picture

I have just installed the dev version for drupal 7 and want to confirm that background issue is resolved now.

deryck.henson’s picture

Status: Fixed » Closed (fixed)

This appears to work as expected and I don't think my previous suggestion is necessary anymore.

Nicely done. On to the next we go.

ownage’s picture

Version: 7.x-2.11 » 7.x-2.12
Issue summary: View changes
Status: Closed (fixed) » Active

Just read through this issue and was happy to see that we're aware of it.

I've been using this module for years-- this issue has always been present, and even in the latest version I see no change.

The background still disappears when the background:url is in the following formats:

background: url(../relative/path/image.jpg);
background: url('../relative/path/image.jpg');
background: url("../relative/path/image.jpg");

but the background does NOT disappear when an absolute path is given, e.g.:

background: url(http://domain.com/absolute/path/image.jpg);
background: url('http://domain.com/absolute/path/image.jpg');
background: url("http://domain.com/absolute/path/image.jpg");

I would LOVE to see this fixed.

deryck.henson’s picture

@ownage can you confirm this issue to be present in the most recent -dev release as well?

Also, please check whether the background fails to load after the stylesheet with the code has both been loaded and typing has begun.

I don't mean to say that starting to edit a file (thus reloading the stylesheet) should be a necessary step to load the background, I'm just troubleshooting to see just how much debugging is needed for us to fix this issue.

I can tell you for Drupal 7.26, Live CSS 2.x-dev (most recent release) and Chrome 33 or Firefox 26, this is fixed as long as a single keystroke on the stylesheet in question has been made.

I'll see if I can get this to load upon opening of the CSS sidebar instead of needing to be initiated manually.