Skip to content

Commit

Permalink
fix: setting offset breaks "centered" plugin #394 (#618)
Browse files Browse the repository at this point in the history
* change padding to margin to avoid spacing issues with box sizing: border-box
  • Loading branch information
RobertHebel committed Jul 24, 2020
1 parent f7136aa commit cfae59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react-carousel/src/components/CarouselSlide.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const CarouselSlide = ({
...(itemClassNames || []),
)}
style={{
paddingRight: `${offset / 2}px`,
paddingLeft: `${offset / 2}px`,
marginRight: `${offset / 2}px`,
marginLeft: `${offset / 2}px`,
width: `${width}px`,
maxWidth: `${width}px`,
minWidth: `${width}px`,
Expand Down

0 comments on commit cfae59f

Please sign in to comment.