Last active
April 22, 2016 08:43
-
-
Save mariselli/f4661b9c10ca950190b8e379599aad3d to your computer and use it in GitHub Desktop.
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
/* | |
RESPONSIVE MIXINS based on bootstrap breakponts | |
*/ | |
@mixin mobile() { | |
@media (max-width: $screen-xs-max) { | |
@content; | |
} | |
} | |
@mixin notMobile() { | |
@media (min-width: $screen-sm-min ){ | |
@content; | |
} | |
} | |
@mixin tablet($how:'only') { | |
@if $how == 'only' { | |
@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { | |
@content; | |
} | |
} | |
@if $how == 'up' { | |
@media (min-width: $screen-sm-min) { | |
@content; | |
} | |
} | |
@if $how == 'down' { | |
@media (max-width: $screen-sm-max) { | |
@content; | |
} | |
} | |
@if $how != 'only' and $how != 'up' and $how != 'down' { | |
//@error "mixin tablet support: only, up, down"; | |
} | |
} | |
@mixin desktop($how) { | |
@if $how == 'only' { | |
@media (min-width: $screen-md-min) and (max-width: $screen-md-max) { | |
@content; | |
} | |
} | |
@if $how == 'up' { | |
@media (min-width: $screen-md-min) { | |
@content; | |
} | |
} | |
@if $how == 'down' { | |
@media (max-width: $screen-md-max) { | |
@content; | |
} | |
} | |
@if $how != 'only' and $how != 'up' and $how != 'down' { | |
//@error "mixin desktop support: only, up, down"; | |
} | |
} | |
@mixin desktopLarge() { | |
@media (min-width: $screen-lg-min) { | |
@content; | |
} | |
} | |
@mixin notDesktopLarge() { | |
@media (max-width: $screen-md-max) { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment