flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Flickity Viewport height not consistent and too small until window resize

Open Mar1AK opened this issue 2 years ago • 1 comments

I have a slider, and flickity is inside that slider. 6 slides in total, the first 4 slides load fine mostly, the last 2 load as viewport-height 25px until the window is resized then the viewport-height readjusts to the full image size in it as intended.

Current options are as follows: jQuery(document).ready(function($){ $('.main-carousel').flickity({ // options cellAlign: 'left', imagesLoaded: true, setGallerySize: true, contain: true }); });

I tried adaptiveHeight and other options but nothing worked. Tried one solution in another post where adding padding-top: x% then margin-top: -x% and didn't work.

Also, this happens on first load 100% of the time, but after that it happens randomly sometimes yes sometimes no.

Any ideas appreciated. Thanks.

Mar1AK avatar Jan 31 '23 18:01 Mar1AK

I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.

desandro avatar Feb 06 '23 01:02 desandro