Skip to content

Instantly share code, notes, and snippets.

@Spellhammer
Created January 19, 2022 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spellhammer/24a633a1d0eb639d293dc1e26c4d8406 to your computer and use it in GitHub Desktop.
Save Spellhammer/24a633a1d0eb639d293dc1e26c4d8406 to your computer and use it in GitHub Desktop.
Dynamic Image Accordion CSS
.image-accordion__item {
flex-grow: 1;
}
.image-accordion__item--active {
flex-grow: 10;
}
.image-accordion__link {
opacity: 1;
transition: 0.3s opacity ease-in-out;
}
.image-accordion__item:not(.image-accordion__item--active) .image-accordion__link {
opacity: 0;
}
body:not(.ng-scope) .image-accordion__item:not(.image-accordion__item--active) .image-accordion__details {
pointer-events: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment