yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

flickity carusel no control over margin between images in carusel #93

Closed amosguata closed 3 years ago

amosguata commented 4 years ago

opened this issue on stackoverflow: https://stackoverflow.com/questions/59724659/flickity-carusel-no-control-over-margin-between-images-in-carusel

the problem is i have no control over the the spcae between images in the carusel when resizing the browser window: https://codesandbox.io/s/flickity-changin-margin-example-s5gws

even after adding margin right to each carusel-cel https://codesandbox.io/s/flickity-changin-margin-example-yk0xj the space between two images is inconsistent after resizing the browser window

before resize: before resize

after resize: after resize

yaodingyd commented 4 years ago

Screen Recording 2020-07-14 at 02 17 PM It works fine for me

amosguata commented 4 years ago

@yaodingyd can't you see that the margin is different before resizing window and after? Look closely. In your case its a small difference but my hole point is that it is inconsistent.

yaodingyd commented 4 years ago

in your example you use padding-right: 1%; (not margin) which is not a fixed value so it will shrink after you reduce screen size.

amosguata commented 4 years ago

it doesn't really matter if you change the CSS to have margin-right:5px you are still not able to control the margin between images when the windows goes through resize.

before resize: image

after resize: image

amosguata commented 4 years ago

when i am saying resize i mean full page and minimizing the browser to be less

yaodingyd commented 4 years ago

I can't reproduce ur issue. If you really have margin:5px this fixed value not shown by browser, I don't think it's a question for this library.