YIZHUANG / react-multi-carousel

A lightweight production-ready Carousel that rocks supports multiple items and server-side rendering with no dependency. Bundle size 2kb.
MIT License
1.25k stars 286 forks source link

Is there any way to use box-shadow properly? #271

Closed ncesar closed 2 years ago

ncesar commented 3 years ago

Describe the bug I realized that using box-shadow in a component makes the slider looks weird.

To Reproduce Steps to reproduce the behavior:

  1. Create a slider
  2. Add an item that has a box-shadow
  3. It will have a buggy shadow

Expected behavior Shadows to be properly applied to children

Screenshots image

Additional context Add any other context about the problem here.

Reproduction https://codesandbox.io/s/angry-dust-uz1by

jayeshnathwani commented 2 years ago

In you example Box-shadow is working but only left and right as there is no space at top and bottom. Add margin and it should work.

After adding margin:10px;

image

Note: you may want to verify does margin affect any other place like paging, i havent verified that.