Skip to content

Instantly share code, notes, and snippets.

@studentIvan
Created October 19, 2016 13:50
Show Gist options
  • Save studentIvan/07324ecc4da1262f1b9ca967fe3d7a37 to your computer and use it in GitHub Desktop.
Save studentIvan/07324ecc4da1262f1b9ca967fe3d7a37 to your computer and use it in GitHub Desktop.
ipad($version = all, $orientation = all)
$orientation == all ? 'and' : 'and (orientation: ' + $orientation + ') and'
if $version == mini or $version == 1 or $version == 2 or $version == all
$query = 'only screen and (min-device-width: 768px) and (max-device-width: 1024px) %s (-webkit-min-device-pixel-ratio: 1)' % $media-orientation
@media $query
{block}
if $version == 3 $version == 4 or $version == all
$query = 'only screen and (min-device-width: 768px) and (max-device-width: 1024px) %s (-webkit-min-device-pixel-ratio: 2)' % $media-orientation
@media $query
{block}
@studentIvan
Copy link
Author

This is mixin for stylus for detecting iPad
Это mixin для stylus для iPad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment