Skip to content

Instantly share code, notes, and snippets.

@chrismitchell
Last active February 28, 2018 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismitchell/6266418eadaad452f8a7ffa72adaac82 to your computer and use it in GitHub Desktop.
Save chrismitchell/6266418eadaad452f8a7ffa72adaac82 to your computer and use it in GitHub Desktop.
breakpoints
window.breakpoints = {
xs: { min: 0, max: 480 },
sm: { min: 481, max: 768 },
md: { min: 769, max: 992 },
lg: { min: 993, max: 10000 },
is: function(size) {
return (
window.innerWidth >= breakpoints[size].min &&
window.innerWidth <= breakpoints[size].max
);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment