diff --git a/src/grid/styles.js b/src/grid/styles.js index f866660..5e92db8 100644 --- a/src/grid/styles.js +++ b/src/grid/styles.js @@ -1,4 +1,4 @@ -import { media, breakpoints, containers } from '../spec'; +import { media, breakpoints, containers, offsets } from '../spec'; const styles = { grid: { @@ -17,6 +17,7 @@ const styles = { Object.keys(breakpoints).forEach(breakpoint => { styles.grid[media(breakpoint)] = { width: breakpoint === 'xs' ? '100%' : containers[breakpoint], + padding: [0, offsets[breakpoint]], }; }); diff --git a/src/spec.js b/src/spec.js index 6a27a27..3a994e8 100644 --- a/src/spec.js +++ b/src/spec.js @@ -21,12 +21,21 @@ export const columns = 12; export const gutter = 20; +export const offsets = { + // Used for Grid's outer padding + xs: 12, + sm: 24, + md: 28, + lg: 96, + xl: 10, +}; + export const containers = { xs: false, - sm: breakpoints.sm - 2 * 24, - md: breakpoints.md - 2 * 28, - lg: breakpoints.lg - 2 * 94, - xl: breakpoints.xl - 2 * 40, + sm: breakpoints.sm, + md: breakpoints.md, + lg: breakpoints.lg, + xl: breakpoints.xl, }; export default {