angular-swiper icon indicating copy to clipboard operation
angular-swiper copied to clipboard

allow attribute to set class of navigation buttons

Open edamon opened this issue 9 years ago • 3 comments

I'd like an attribute so I can set the nav arrows to "swiper-button-white". I'll try to make a pull request soon.

edamon avatar Apr 13 '16 00:04 edamon

Sounds like an interesting idea, but shouldn't this be managed through css. External stylesheets are more performance effective then inline styles.

brh55 avatar Apr 13 '16 15:04 brh55

"swiper-button-white" is an exisitng css class in the swiper.css https://github.com/nolimits4web/Swiper/blob/master/dist/css/swiper.css.

edamon avatar Apr 17 '16 15:04 edamon

+1 for this, mostly because I tried to specify a custom (existing element) using the override-parameters attribute like this:

<ks-swiper-container class="my-slider" pagination-is-active="true" show-nav-buttons="true" override-parameters="{'nextButton': 'my-slider__button--next', 'prevButton': 'my-slider__button--prev'}">
override-parameters="{'nextButton': 'my-slider__button--next', 'prevButton': 'my-slider__button--prev'}"

... Slides ...

</ks-swiper-container>

However this didn't work, it seems if you try and override the next and prev Button selectors the next and previous buttons no longer work at all.

If we could specify a custom class via an attribute we wouldn't need to use override-parameters to specify a custom element (maybe this is just hacking around the actual issue though...)

WillsB3 avatar Jun 13 '17 13:06 WillsB3