dynamicweb / swiffy-slider

Super fast carousel and slider with touch for optimized websites running in modern browsers.
MIT License
247 stars 30 forks source link

Allow styling of slider-indicators with classes #5

Closed sasham43 closed 2 years ago

sasham43 commented 2 years ago

Is your feature request related to a problem? Please describe. It's difficult to style slider-indicator buttons because all of their classes are stripped when adding/removing the active class. I'm trying to dynamically style these using Tailwind, so using CSS / inline styles aren't really an option.

Describe the solution you'd like Check if the element has the active class, then selectively remove that class instead of removing the entire class attribute.

Loving the simplicity of this slider, just want to be able to implement more color customization options beyond light & dark.

sasham43 commented 2 years ago

7 Added a PR.

nicped commented 2 years ago

Good find! I think I might have done it like that because I do not like to look at that empty class attribute in dev tools :-). But your solution is better! Thanks for observing and taking the time to do the PR! BR Nicolai