Skip to content

Commit

Permalink
fix: revert removal of xs breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmonline committed Jun 28, 2019
1 parent 6bc2e74 commit 3c9ad35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/grid/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ const styles = {
};

Object.keys(breakpoints).forEach(breakpoint => {
if (breakpoint === 'xs') {
styles.grid[media(breakpoint)] = {
width: '100%',
};
}

styles.grid[media(breakpoint)] = {
maxWidth: containers[breakpoint],
width: containers[breakpoint],
padding: [0, offsets[breakpoint]],
};
});
Expand Down
4 changes: 4 additions & 0 deletions src/spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const breakpoints = {
// The grid is mobile first so xs is the default, hence no breakpoint
xs: false,
sm: 768,
md: 992,
lg: 1440,
Expand All @@ -21,13 +23,15 @@ export const gutter = 20;

export const offsets = {
// Used for Grid's outer padding
xs: false,
sm: 24,
md: 28,
lg: 96,
xl: 40,
};

export const containers = {
xs: false,
sm: breakpoints.sm,
md: breakpoints.md,
lg: breakpoints.lg,
Expand Down

0 comments on commit 3c9ad35

Please sign in to comment.