You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: