Created
September 23, 2013 01:53
-
-
Save liquorice/6665641 to your computer and use it in GitHub Desktop.
SASS breakpoints mixin
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
@mixin breakpoint($points) { | |
@if index($points, large) { | |
@media screen and (min-width: 1000) { @content; } | |
html.ie-large & { @content; } | |
} | |
@if index($points, medium) { | |
@media screen and (max-width: 999) and (min-width: 600) { @content; } | |
} | |
@if index($points, small) { | |
@media screen and (max-width: 599) { @content; } | |
} | |
} |
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
<!DOCTYPE html> | |
<!--[if lte IE 8]> | |
<html class="ie-large"> | |
<![endif]--> | |
<!--[if gt IE 8]> --> | |
<html> | |
<!-- <![endif]--> |
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
h1 { | |
@include breakpoint(large, medium) { | |
font-size: 32px; | |
} | |
@include breakpoint(small) { | |
font-size: 24px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Borrowed heavily from @makenosound