Created
November 11, 2013 23:55
-
-
Save cfarm/7422766 to your computer and use it in GitHub Desktop.
Mixin with Fallback CSS for No Media Queries Support
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
| $supported: true !default; // this makes this stylesheet output media queries from our mixin | |
| @mixin breakpoint($screenWidth: 400px, $support: $supported) { | |
| @if $support == true { | |
| // output the mixin content inside of a media query | |
| @media screen and (min-width: $screenWidth) { @content; } | |
| } | |
| @else { | |
| // output ALL the style content inside the mixin, without a media query | |
| @content; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment