Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit cfae59f

Browse files
author
RobertHebel
authored
fix: setting offset breaks "centered" plugin #394 (#618)
* change padding to margin to avoid spacing issues with box sizing: border-box
1 parent f7136aa commit cfae59f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

react-carousel/src/components/CarouselSlide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ const CarouselSlide = ({
7272
...(itemClassNames || []),
7373
)}
7474
style={{
75-
paddingRight: `${offset / 2}px`,
76-
paddingLeft: `${offset / 2}px`,
75+
marginRight: `${offset / 2}px`,
76+
marginLeft: `${offset / 2}px`,
7777
width: `${width}px`,
7878
maxWidth: `${width}px`,
7979
minWidth: `${width}px`,

0 commit comments

Comments
 (0)