Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full screen entry image ratio is wrong #6

Open
kiwichris opened this issue Apr 23, 2018 · 7 comments
Open

full screen entry image ratio is wrong #6

kiwichris opened this issue Apr 23, 2018 · 7 comments
Assignees

Comments

@kiwichris
Copy link

kiwichris commented Apr 23, 2018

I have a slider with images of different widths and heights and I have borrowed from the Flickity options example for fullscreen image carousels centered in cells the CSS. I have:

carousel {
    background: #EEE;
}

.carousel-cell {
    min-height: 100%;
}

.carousel.is-fullscreen .carousel-cell {
    height: 100%;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel.is-fullscreen .carousel-cell-image {
    height: 100%;
    max-width: 100%;
} 

.carousel-cell-image {
    display: block;
    margin-right: 5px;
}

The fullscreen slider works on Chrome on an old IOS iPad, Firefox on Windows 10 and FreeBSD, Edge on Windows 10 however and fails on a recent IOS with Chrome, Safari and Brave, Sarfari on MacOS, and Chrome on Windows. The images do not display when entering fullscreen with an incorrect aspect ratio as if the normal size is being used. The images are too narrow for the height. If I resize the browser while in fullscreen with Safari on MacOS all images are displayed correctly and stay that way. On Window's Chrome if I toggle display: flex; off then on in Chrome's inspector for the .carousel.is-fullscreen .carousel-cell all images are displayed correctly.

@desandro
Copy link
Member

Thanks for reporting this issue. Could you fork the fullscreen demo to produce a reduced test case?

@kiwichris
Copy link
Author

I have forked the demo to fs demo. It is not 100% the same as the issue I am seeing however I wonder if it some what related. With Firefox on FreeBSD (58.0.2) when full screen if I move the separator up and down the image's aspect ratio is maintained. I see the same thing on Edge on Windows. With Chrome on Windows the width does not change and so the image's aspect ratio changes.

@desandro
Copy link
Member

Thanks, I'll have to take a look.

@desandro desandro self-assigned this Apr 24, 2018
@kiwichris
Copy link
Author

Thank you. I have managed to create exactly what I am seeing with fullscreen aspect ratio demo.

@kiwichris
Copy link
Author

Anything I can do help figure this one out?

1 similar comment
@kiwichris
Copy link
Author

Anything I can do help figure this one out?

@cutreth
Copy link

cutreth commented Sep 1, 2019

Bump. I'm seeing this for Chrome on Windows as well. As mentioned above, toggling the CSS via dev tools solves the issue. Any suggestions on a hacky fix that could just do that toggle via JS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants