Skip to content

Instantly share code, notes, and snippets.

@juliendargelos
Last active March 18, 2019 01:32
Show Gist options
  • Save juliendargelos/a57fc8bd9c94d10a72374f4542009a08 to your computer and use it in GitHub Desktop.
Save juliendargelos/a57fc8bd9c94d10a72374f4542009a08 to your computer and use it in GitHub Desktop.
Media mixins.
$tablet: 800px
$desktop: 1000px
=media-min-height($height)
@media screen and (min-height: $height)
@content
=media-min-width($width)
@media screen and (min-width: $width)
@content
=media-portrait
@media screen and (orientation: portrait)
@content
=media-landscape
@media screen and (orientation: landscape)
@content
=media-webkit
@media screen and (-webkit-min-device-pixel-ratio: 0)
@content
=media-print
@media print
@content
=media-tablet
+media-min-width($tablet)
@content
=media-desktop
+media-min-width($desktop)
@content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment