Skip to content

Instantly share code, notes, and snippets.

@whatjackhasmade
Last active June 5, 2017 11:12
Show Gist options
  • Save whatjackhasmade/b0be5e5387e83072cc71df0f6a3ae142 to your computer and use it in GitHub Desktop.
Save whatjackhasmade/b0be5e5387e83072cc71df0f6a3ae142 to your computer and use it in GitHub Desktop.
Mixin - Media Queries
/*/////////////////////////////////////////
/// MEDIA QUERIES
*/////////////////////////////////////////
/**
* Mixins for defining media queries. These mixins should always be used
* to define media query breakpoints.
*/
@mixin bp-min-width($width) {
@media all and (min-width: $width) {
@content;
}
}
/**
* Only use in rare circumstances, favour `bp-min-width`.
*/
@mixin bp-max-width($width) {
@media all and (max-width: $width) {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment