Skip to content

Commit

Permalink
fix: Setting offset breaks "centered" (#394)
Browse files Browse the repository at this point in the history
- use padding instead of margin for CarouselItem.js to avoid spacing issues with box sizing: border-box

Signed-off-by: mhatvan <markus_hatvan@aon.at>
  • Loading branch information
mhatvan committed Jul 13, 2020
1 parent 9dbc374 commit 5f69446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CarouselItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class CarouselItem extends PureComponent {
},
)}
style={{
paddingRight: `${this.props.offset / 2}px`,
paddingLeft: `${this.props.offset / 2}px`,
marginLeft: `${this.props.offset / 2}px`,
marginRight: `${this.props.offset / 2}px`,
width: `${this.props.width}px`,
maxWidth: `${this.props.width}px`,
minWidth: `${this.props.width}px`,
Expand Down

0 comments on commit 5f69446

Please sign in to comment.