Skip to content

Instantly share code, notes, and snippets.

@PCianes
Last active July 3, 2017 11:02
Show Gist options
  • Select an option

  • Save PCianes/c1259d233659fad471aa515340b55833 to your computer and use it in GitHub Desktop.

Select an option

Save PCianes/c1259d233659fad471aa515340b55833 to your computer and use it in GitHub Desktop.
Neat Breakpoints
// Native CSS breakpoint
@media screen and (max-width: 1023px) {
// styles
}
// Device size breakpoint
@media screen and (max-width: $screen-size--medium) {
// styles
}
// Device size with Neat function `media`
@include media($breakpoint__screen-size--medium) {
// styles
}
//
// Standard Media Query Breakpoints
//=======================
$large-desktop: rem(1680);
$desktop: rem(1366);
$tablet-landscape: rem(1024);
$wp-admin-bar: rem(783);
$tablet-portrait: rem(768);
$phone-landscape: rem(640);
$phone-portrait: rem(360);
@PCianes
Copy link
Copy Markdown
Author

PCianes commented Jul 3, 2017

There are various strategies available for handling the media query breakpoints including these 3 options, which all do the same thing.
The advantage to setting a new breakpoint in the _breakpoints.scss file is you make all changes to your breakpoints in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment