electerious / basicLightbox

The lightest lightbox ever made.
https://basiclightbox.electerious.com
MIT License
557 stars 55 forks source link

Handling <picture> tag #35

Closed 8lall0 closed 3 years ago

8lall0 commented 3 years ago

When i try to put a tag, since i want to support webP, the image acts weird.

electerious commented 3 years ago

Can you provide a reproducible demo or a detailed explanation of what you're doing and what's happening?

8lall0 commented 3 years ago

Since the tag is not handled, if an image is bigger than the viewport it simply covers all. I took a look at your code, you only take care of direct children (>img, >iframe etc.) and, since it's not handled, it doesn't append the correct modifier class (--img etc.).

Maybe i found a way, do you accept pull requests?

electerious commented 3 years ago

Maybe i found a way, do you accept pull requests?

Sure!

8lall0 commented 3 years ago

Done :) i close this issue!