lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.22k stars 1.77k forks source link

title with link - css problem #536

Closed crisc2000 closed 8 years ago

crisc2000 commented 8 years ago

Hey Lokesh I'm a developer, I have made program that can generate html lightbox2 code . My program also have an option to generate titles with links. My generated code is something like this: <a href="http://piwigo.org/demo/_data/i/upload/2016/06/21/20160621161901-690d078f-me.jpg" data-lightbox="id172" data-title="<a target='_blank' href='http://piwigo.org/demo/picture.php?/1546'>Chevaux de Camargue</a>"><img class="alignleft" src="http://piwigo.org/demo/_data/i/upload/2016/06/21/20160621161901-690d078f-sq.jpg" /></a> When the lightbox2 title is linked the color transform to white into dark blue. Very hard to see on a semi-transparent dark background. The visited link is even worse. It's dark grey. You can barely see it. See attached print screen. clipboard01

I personally can insert one or two lines at my end of lightbox.css file and fix the problem .lb-caption a { color: #fff !important; } but if the users use the official version or a CDN version or a lightbox.css minified , I cannot ask all users to make this modification for the Lightbox2 with linked title to be usable. So please also modify the official version.

lokesh commented 8 years ago

By default the caption link should use the color that is set as your default a color.

lightbox

Closing as this is not a bug.

crisc2000 commented 8 years ago

By default the caption link should use the color that is set as your default a color.

:( NO, not a good idea! The "a" color of lightbox2 caption should be something visible against lightbox2 default dark background. And I can explain you why.

Because default "a" color on the page can be something dark/gray especially if the page background is a light color (like white). Your example with "a" default color on page being light blue on a white background is a happy coincidence.

They are thousands of wordpress themes out there, some users of my wordpress plugin that loading lightbox2 from a CDN may have bad luck and have a wordpress theme with dark "a" default color.

You must think this from the end users perspective, some wordpress users may not have skills to make css modifications to their theme. Or some developers may use CDN to load lightbox2 in the page ( https://cdnjs.com/libraries/lightbox2 / http://www.jsdelivr.com/projects/lightbox2 ) you will force them to use local versions of lightbox2 and manually modify your lightbox.css to add a ".lb-caption a" specification.

lokesh commented 8 years ago

@eliz82 thanks for the follow-up and the details. You make some good points. I'll review solutions today.

lokesh commented 8 years ago

Per your suggestions I'm updating the default link color in Lightbox captions. I'm defaulting to a light blue similar to the default blue link color:

.lb-data .lb-caption a {
  color: #4ae;
}

image

Thanks again for all the feedback!

crisc2000 commented 7 years ago

I'm defaulting to a light blue similar to the default blue link color.

it's ok.