Skip to content

Commit

Permalink
feat(Image): Change background-image: contain to background-image: cover
Browse files Browse the repository at this point in the history
This change is needed so the images' right side won't get chopped off
  • Loading branch information
Csaba Valyi committed Aug 10, 2018
1 parent 016ff3b commit 76b29e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Image/Responsive.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const StyledResponsiveImage = styled.div.attrs({
padding-top: ${({ height, width }) => `${(height / width) * 100}%`};
background-image: ${({ image }) => `url(${image})`};
background-repeat: no-repeat;
background-size: contain;
background-size: cover;
`;

StyledResponsiveImage.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`ResponsiveImage should render correctly 1`] = `
padding-top: 56.25%;
background-image: url(http://placekitten.com/g/826/465);
background-repeat: no-repeat;
background-size: contain;
background-size: cover;
}
.c1 {
Expand Down

0 comments on commit 76b29e6

Please sign in to comment.