Created
August 4, 2014 15:40
-
-
Save MichaelArestad/37e8d1c658f488dcdd0b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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