Skip to content

Instantly share code, notes, and snippets.

@faridlab
Created March 1, 2018 17:57
Show Gist options
  • Save faridlab/cdf83dd6f6005de036f2883ea1c23672 to your computer and use it in GitHub Desktop.
Save faridlab/cdf83dd6f6005de036f2883ea1c23672 to your computer and use it in GitHub Desktop.
ionic slide auto height
ion-slide:not(.swiper-slide-active) > div {
display: hidden;
opacity: 0;
height: 0;
transition: display 0s, opacity 0.5s linear;
}
ion-slide:nth-last-child(4):not(.swiper-slide-active) + ion-slide:nth-last-child(3):not(.swiper-slide-active) + ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div,
ion-slide:nth-last-child(3):not(.swiper-slide-active) + ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div,
ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div {
display: block!important;
opacity: 1;
height: auto;
transition: display 0s, opacity 0s linear;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment