Setting 'contain' to TRUE, hides box shadow
Hi, I have been experiencing a bug with the flickity. For my gallery-cell's. I have a css property for them, a box shadow on them.
.gallery-cell { box-shadow: 0 2px 2px rgba(0,0,0,0.6); }
But it doesn't matter what values I use. What happens is that flickity ignores the box shadow and hides the first gallery cell's left box shadow part. It applies a css to the "flickity-slider" class to set property to "transform" to some "negative" value and hides the shadow on the left and the last element's right. Is there any work around to this?
I tried different things to fix this, but nothing worked.
Flickity sets .flickity-viewport { overflow: hidden; } so that cells outside of the viewport are not visible on the page. Having them visible will cause a horizontal scroll bar.
One solution is to add margin to the cells, so the viewport has more space around them and the box shadow will not be cropped. See cell box-shadow demo
.gallery-cell {
width: 66%;
height: 200px;
margin: 20px 10px 20px 0;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6);
}