-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Normally I use this plugin in responsive layouts were images or other lazy loaded elements have rules that make them block elements and inherit a width from their parent:
img.mylazyimage{
display: block;
width: 100%;
}Without some style rule or content to to give the element the correct size, the sizing logic will fail because laziestloader will miscalculate the target size.
Seems like the plugin should know this case and compensate.
One possible solution could be to checkout display type and temporarily give it the above rules, calculate the width, determine the best image size and then reset the element to its previous state.
This would work in many cases but would fail -- I believe -- if the element's parent also doesn't have a size (like it's position: absolute but without a width)
Ideas to fix this?