kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 281 forks source link

Remove classes when there is no image behing the target #30

Closed tadaskarpavicius closed 10 years ago

tadaskarpavicius commented 10 years ago

I don't know if it's a bug or a feature request. But it would be awesome if all classes would be removed from target if there is no image behind it.

Maybe there is a quick fix? Thanks

kennethcachia commented 10 years ago

Hi!

All the classes added by BackgroundCheck should be removed if there is no image behind it. Removing the rest of the classes (that have nothing to do with BackgroundCheck) is beyond the scope of this plugin. I'm curious though, why do you need this functionality?

Thanks!

tadaskarpavicius commented 10 years ago

Hey, sorry for the delay, but i figured it out. The problem was that i was hiding a page behind another so unexpected things happened. Now i am resetting images when another page is opened and it works great.

Awesome plugin! I love it!

P.S. Detecting background-color would be awesome, but i can see that this is a tough task.

kennethcachia commented 10 years ago

No problem!

(Yeah, but it might be included in a future release).