-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi, great library!
In using this I've wanted to use it for images within the <picture> element
Because image-focus looks for the parentElement of an image as the container, styling can get messed up if the parent is a <picture>. This line has worked as a fix for me, bypassing the parent <picture>
this.container = imageNode.parentElement.tagName == "PICTURE" ? imageNode.parentElement.parentElement : imageNode.parentElement;
Alternatively, allow me to explicitly set a container option that would override the default parentElement
phil-quinn, Tonic-Digital and MPriess
Metadata
Metadata
Assignees
Labels
No labels