voronianski / swipe-js-iso

Universal (a.k.a isomorphic) version of Swipe.js
https://www.npmjs.com/package/swipe-js-iso
MIT License
187 stars 57 forks source link

Active state for current slide #27

Open PabloMarch opened 5 years ago

PabloMarch commented 5 years ago

I couldn't find a way to set styles for the current slide, is this possible?

Cyberlane commented 5 years ago

Do you want to apply a style that only affects the currently visible slide? If so, that is currently no possible with pure CSS as the information for the selectors isn't there.

However, it would be possible to extend the code easily enough to add a previousSlide, currentSlide and nextSlide class to the relevant slides, and you could target your styling towards those.