Last active
October 27, 2015 00:00
-
-
Save IainIsCreative/73ea36ca8e4d332f0b2c 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@mixin breakpoint($breakpoint) { | |
// The following code no longer works in libSass 3.3.0 | |
// It will return an error and say it can't pass a content block | |
//Check if the value passed in is a unitless number | |
@if not unitless($breakpoint) { | |
//Pass an error if not unitless. | |
@error 'Your value for `$breakpoint` is not unitless. Please try again.'; | |
} @else { | |
$bp: ($breakpoint / 16) * 1em; | |
//Set Media Query and pass through a number. | |
@media screen and (min-width: $bp) { | |
@content; | |
} | |
} | |
} | |
@include breakpoint(600) { | |
.element { | |
width: 480px; | |
} | |
} |
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 screen and (min-width: 37.5em) { | |
.element { | |
width: 480px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment