glide icon indicating copy to clipboard operation
glide copied to clipboard

When using box-shadow, the last slide currently being displayed does not show the full shadow

Open opr opened this issue 5 years ago • 3 comments

Here's a screenshot of it happening and also a link to a code sandbox - any ideas on how to fix this?

image

https://codesandbox.io/s/purple-https-sp75u?file=/index.html

Thanks!

opr avatar Oct 23 '20 09:10 opr

Any fix to this?

abdennourzahaf avatar May 24 '21 10:05 abdennourzahaf

help :(

BlackKiwi89 avatar Dec 13 '21 11:12 BlackKiwi89

The problem is that there is not declarative way to add a padding between the glide container and its slides. A workaround is to take advantage of the peek property to add some horizontal margin and some custom css for the top and bottom.

/* 
* index.js
* Adjust the peek option as per your needs
*/
new Glide(".glide", {
    peek: 5,
}).mount();
/* 
* style.css
* Load this file after the glide stylesheet and adjust the paddings as per your needs
*/
.glide__slides {
    padding-top: 10px;
    padding-bottom: 10px;
}

demedos avatar Oct 13 '22 20:10 demedos