Vue-carousel: Feature Request: Create prop to add margin between elements

Created on 25 Jul 2017  路  13Comments  路  Source: SSENSE/vue-carousel

I'm increasing horizontal margin on VueCarousel-slide, but the carousel is being cut off.

image

I can set flex-basis manually but it doesn't get updated with resolution changes.

```


```

feature

All 13 comments

I want margin between slides too!

up

Hey guys, we actually do have a spacePadding prop that adds padding between slides. I'm aware it's not the same, but it can achieve a similar look if that's all that's required. Otherwise adding the margin would be easy enough, will just need someone to submit the PR!

If you run the dev server, you can see an example inside vue-play at localhost:5000

I'll make this as a good first feature to try and get some traction

spacePadding does not add spaces between slides, but add extra space on edges left/right of carousel

to add some space on each slide, i added on css 8px padding left/right on each slide

to add some space on each slide, i added on css 8px padding left/right on each slide

@CavalcanteLeo, did you encounter a bug in IE11? I tried to do the same an but slides don't fit the slider width anymore

@markus361 Maybe a bit late to answer but I had the same issue. I check this thread, understand the problem and my solution was, this one:

if feasible, do not apply padding or border directly to a flex child. Allow the flex child to be a containing element to another element that will receive the padding or border. This is somewhat undesirable because avoiding this sort of extra markup is one the big benefits of box-sizing:border-box;.

        .VueCarousel-slide > div {
            padding-left: 15px;
            padding-right: 15px;
        }

This solved the problem for me.

up please

Guys, use padding instead...

In the slide tag, make a wrap and set it to padding : 0 10px;

with padding is bool sheet

Has it not been implemented?

@KaragiannidesAgapios proposition solved my issue too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ranasl62 picture ranasl62  路  3Comments

blackforestcode picture blackforestcode  路  4Comments

daanhaitsma picture daanhaitsma  路  5Comments

gomezmark picture gomezmark  路  5Comments

bepi-roggiuzza picture bepi-roggiuzza  路  4Comments