Created
April 23, 2015 12:54
-
-
Save tormjens/8cd3b3dbb1095f08c6ca to your computer and use it in GitHub Desktop.
Foundation Breakpoint Mixin
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
@mixin breakpoint($breakpoint, $orientation:"") { | |
$break: $breakpoint; | |
$orient: ""; | |
@if $breakpoint == 'small' { | |
$break: $small-only; | |
} | |
@else if $breakpoint == 'small-up' { | |
$break: $small-up; | |
} | |
@else if $breakpoint == 'medium' { | |
$break: $medium-only; | |
} | |
@else if $breakpoint == 'medium-up' { | |
$break: $medium-up; | |
} | |
@else if $breakpoint == 'large' { | |
$break: $large-only; | |
} | |
@else if $breakpoint == 'large-up' { | |
$break: $large-up; | |
} | |
@else if $breakpoint == 'xlarge' { | |
$break: $xlarge-only; | |
} | |
@else if $breakpoint == 'xlarge-up' { | |
$break: $xlarge-up; | |
} | |
@else if $breakpoint == 'xxlarge-up' { | |
$break: $xxlarge-up; | |
} | |
@if $orientation != "" { | |
$orient: 'and (orientation : #{$orientation})'; | |
} | |
$bp: #{$break} #{$orient}; | |
@media #{$bp} { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment