Last active
September 3, 2015 10:07
-
-
Save roytomeij/0e548199aabaf01055a3 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@mixin respond($orientation, $media:null) { | |
$allowed-orientation: portrait, landscape; | |
$allowed-media: null, mobile, tablet; | |
@if ( | |
($orientation and index($allowed-orientation, $orientation)) | |
and | |
index($allowed-media, $media) | |
){ | |
html.#{if($media, "#{$media}.", "")}#{$orientation} & { | |
@content; | |
} | |
} | |
@else { | |
html & { | |
@content; | |
} | |
} | |
} | |
.l { | |
@include respond(landscape) { | |
color: red; | |
} | |
} | |
.mp { | |
@include respond(portrait, mobile) { | |
color: blue; | |
} | |
} | |
.not-allowed-orientation { | |
@include respond(widescreen) { | |
color: red; | |
} | |
} |
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
html.landscape .l { | |
color: red; | |
} | |
html.mobile.portrait .mp { | |
color: blue; | |
} | |
html .not-allowed-orientation { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment