Skip to content

Instantly share code, notes, and snippets.

@JoeNoPhoto
Created October 14, 2015 06:56
Show Gist options
  • Save JoeNoPhoto/fd79e730fb3248a5c5f8 to your computer and use it in GitHub Desktop.
Save JoeNoPhoto/fd79e730fb3248a5c5f8 to your computer and use it in GitHub Desktop.
Mixin for adding breakpoints
@mixin bp-large {
@media only screen and (max-width: 60em) {
@content;
}
}
@mixin bp-medium {
@media only screen and (max-width: 40em) {
@content;
}
}
@mixin bp-small {
@media only screen and (max-width: 30em) {
@content;
}
}
@JoeNoPhoto
Copy link
Author

usage

.sidebar {
  width: 60%;
  float: left;
  margin: 0 2% 0 0;
  @include bp-small {
    width: 100%;
    float: none;
    margin: 0;
  }
}

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