Skip to content

Instantly share code, notes, and snippets.

@maslowivan
Created October 19, 2016 13:50
Show Gist options
  • Select an option

  • Save maslowivan/07324ecc4da1262f1b9ca967fe3d7a37 to your computer and use it in GitHub Desktop.

Select an option

Save maslowivan/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}
@maslowivan

Copy link
Copy Markdown
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