Last active
December 14, 2015 09:09
-
-
Save magnetikonline/5062868 to your computer and use it in GitHub Desktop.
Sass media query @mixin example.
This file contains 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
$breakSmall: 320px; | |
$breakLarge: 1024px; | |
@mixin respondTo($media) { | |
@if ($media == handhelds) { | |
@media only screen and (max-width: $breakSmall) { @content; } | |
} | |
@else if ($media == medium-screens) { | |
@media only screen and (min-width: $breakSmall + 1) and (max-width: $breakLarge - 1) { @content; } | |
} | |
@else if ($media == wide-screens) { | |
@media only screen and (min-width: $breakLarge) { @content; } | |
} | |
} | |
.profile-pic { | |
float: left; | |
width: 250px; | |
@include respondTo(handhelds) { width: 100% ;} | |
@include respondTo(medium-screens) { width: 125px; } | |
@include respondTo(wide-screens) { float: none; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment