metafizzy / flickity-fade

Fade between Flickity slides
62 stars 18 forks source link

Fade on desktop while slide on mobile #12

Closed alex1webdev closed 4 years ago

alex1webdev commented 4 years ago

Hello! I used this code to override the default slide:

.flickity-slider{ transform: none !important; } .cell { left: 0 !important; opacity: 0; transition: "opacity 0.3s ease-in-out"; } .cell.is-selected{ opacity: 1; }

This though overrides slide on both mobile and desktop. How can I make larger screens to still be on fade while mobile to use slide? Thanks!

alex1webdev commented 4 years ago

figured this out, pretty easy one:

@media screen and (min-width: 800px) { .flickity-slider { transform: none !important; } .cell { left: 0 !important; opacity: 0; transition: "opacity 0.3s ease-in-out"; } .cell.is-selected{ opacity: 1; } }