react-styled-flexboxgrid
react-styled-flexboxgrid copied to clipboard
outerMargin 0 cause scrolling on mobile
if you set outerMargin to 0 and resize the browser to mobile breakpoint it causes scrolling.
Steps to reproduce:
- enter: https://loicmahieu.github.io/react-styled-flexboxgrid/demo/index.html
- set outerMargin = 0
- resize browser
To be more precise: You'll have horizontal scrolling if the outerMargin is less than half a gutterWidth.
I'm not sure if this is a bug or a feature, actually.
definitely feature sounds useful :) anyways I use this workaround:
const styledRow = styled(Row)
@media (max-width: ${media.sm}) {
margin-left: 0;
margin-right: 0;
}
`;
const styledCol = styled(Col)`
@media (max-width: ${media.sm}) {
padding-right: 0;
padding-left: 0;
}
`;
If @misund is right, we could calculate if the outerMargin is less than half a gutterWidth and in this case ?