Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 6e33f60

Browse files
committed
fix: fix grid gutter
1 parent f92f0ef commit 6e33f60

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/shared/core/Grid.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import PropTypes from 'prop-types'
22
import { pr, pl } from '@smooth-ui/system'
3+
import { css } from './styled-engine'
34
import { mediaMinWidth } from './utils/index'
45
import { gridMaxWidths, gridGutter, breakpoints } from './theming/index'
56
import { getSystemPropTypes } from './utils/propTypes'
@@ -24,14 +25,14 @@ const Grid = createComponent(() => ({
2425
omitProps: ['gutter', 'fluid'],
2526
style: p => {
2627
const { gutter = gridGutter(p) } = p
27-
return {
28-
width: '100%',
29-
...pr({ pr: gutter })(p),
30-
...pl({ pl: gutter })(p),
31-
marginRight: 'auto',
32-
marginLeft: 'auto',
33-
...(p.fluid ? null : styleBreakpoints(p)),
34-
}
28+
return css`
29+
width: 100%;
30+
margin-left: auto;
31+
margin-right: auto;
32+
${pr({ pr: gutter })(p)};
33+
${pl({ pl: gutter })(p)};
34+
${p.fluid ? null : styleBreakpoints(p)};
35+
`
3536
},
3637
propTypes: {
3738
children: PropTypes.node,

0 commit comments

Comments
 (0)