Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created August 4, 2014 15:40
Show Gist options
  • Save MichaelArestad/37e8d1c658f488dcdd0b to your computer and use it in GitHub Desktop.
Save MichaelArestad/37e8d1c658f488dcdd0b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.0)
// ----
// ==========================================================================
// Breakpoint Mixin
//
// Uses Sass Maps which requires Sass v3.3.0 or newer
// ==========================================================================
// Add or remove breakpoints as you desire
$breakpoints:(
full-width: 960px,
one-col: 660px,
mobile: 480px,
phone: 320px,
phablet: 500px,
tablet: 768px,
desktop: 960px,
billboard: 10000px
);
@mixin breakpoint($size){
@each $breakpoint, $value in $breakpoints {
@if $size == $breakpoint {
@media (max-width: map-get($breakpoints, $breakpoint)){
@content;
}
}
}
}
// EXAMPLE
body {
@include breakpoint(full-width){
font-size: 14px;
};
}
@media (max-width: 960px) {
body {
font-size: 14px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment