When using csstidy, the "loading" image in lightbox2 appears over to the very left of the image being loaded.
This is provided as part of the lightbox2 module, http://drupal.org/project/lightbox2

If I disable csstidy, the image appears in the middle as expected.

I can provide links etc to show what I mean, but it's as simple as installing the lightbox2 module, adding a a href with the rel="lightbox" attrib and viewing the loading image. Disable csstidy and compare.

It's a very, very small bug and otherwise I've noticed no problems.

This isn't a great bug report, but I'm not sure what else to mention. Latest v6.16 of Drupal.

Comments

philbar’s picture

Assigned: Unassigned » philbar

Good catch.

The problem is the CSS hack used by lightbox2:

#loading {
  left: 45%;
  *left: 0%;
}

I will see what I can do to fix it.

philbar’s picture

Status: Active » Fixed
tjharman’s picture

I've applied the fixed as shown here but it hasn't fixed the problem for me.

Using Firefox 3.6.3 to test with.

Was there any other part(s) that needed patching?

Cheers,
Tim

philbar’s picture

I forgot the change to option to "true" after copying it:

$css->settings['save_ie_hacks'] = true;

tjharman’s picture

Can you confirm it's fixed it for you?

I've changed it to true and it still doesn't work for me. I've cleared all caches, ensured to delete the contents of my files/css

Soon as I disable csstidy it's fine.

FF 3.6.3

Tim

philbar’s picture

Status: Fixed » Needs work

Oh, I forgot to change back some of the changes to the css of lightbox when testing this.

I replaced the following in my lightbox.css file (I use the alt theme):

#loading {
  *left:0%;
}
*+html #loading, * html #loading{
  left:0;
}

That makes it CSS2.1 compliant but it does tack on a few more characters, adding to size.

I will continue to search for a better fix.

philbar’s picture

Status: Needs work » Fixed

Committed following addition, which should add the IE Hack back in after processing with CSSTidy:

// Fix for Lightbox2 IE Hack
if (module_exists(lightbox2)) {
	$lighboxhack = "\#loading \{\*left\:0\}";
	$contents = $contents . $lightboxhack;
}
philbar’s picture

Status: Fixed » Needs work

Did some testing and this still needs work.

philbar’s picture

Status: Needs work » Fixed

Fixed in dev

I probably will make some adjustments to this since there is some duplication which makes css optimization less than optimal.

jimkont’s picture

i noticed that when "css tidy" is used with "CSS Embedded Images" enabled,
the loading image is displayed as it should

philbar’s picture

Is your stylesheet renamed to have tidy.css appended? You should see something like .emimage.tidy.css or .tidy.emimage.css if both modules are working.

Perhaps CSS Embedded Images is conflicting.

jimkont’s picture

no it is not,
the are probably conflicting

this could be a new issue?

philbar’s picture

If your using CSS Embedded Image 2.x then there was a problem with running with earlier versions of CSSTidy. I believe it is fixed in the 6.x-1.x branch of CSSTidy.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

philbar’s picture