What I observe in Drupal 6.6 is that the CSS of a sub-theme, which calls for a different background image, compared to the main theme, works well when Optimize CSS files is off, but displays the main theme background image when Optimize CSS is enabled.
The really odd thing is that this problem crops up in Google Chrome, but not in Internet Explorer 7. Don't have Firefox here right now.
The CSS files are simple in this respect. Both main and sub-theme contain a background-image line for the body tag, but the images are different. The problem shows up regardless of whether the image filenames are identical or not. Other CSS entries, like height, are correctly obeyed.
When I enable CSS optimization, Chrome instantly displays the wrong image. I don't even have to clear any caches, neither in Drupal, nor in the browser. When I disable CSS optimization, Chrome instantly displays the correct sub-theme image.
I am fairly sure that the CSS files are clean and correct. There is nothing particularly difficult in them. I built the theme, starting with the Foundation theme.
I will later test this in Firefox and report here. It may end up being a bug in Chrome, rather than Drupal. But I'm reporting it here for the time being, so others can chime in if they experience the same problem.
Hans-Georg
Comments
Comment #1
hgmichna commentedRetested in Firefoxsame problem. Perhaps all WebKit-based browsers show the problem.
Whether the fault lies in the browsers or in Drupal, I think Drupal should be amended to avoid this error. Here's the relevant part of the code.
Main theme style.css:
Sub-theme level1.css:
The background image for the sub-theme is in the sub-theme's folder, not in the main theme's folder.
As you can see, it's utterly simple. It would be nice though if anybody could confirm this and consequently change the status of this issue from "active (needs more info)" to "active".
Comment #2
dpearcefl commentedClosing this issue because of a lack of activity.