Skip to content

Instantly share code, notes, and snippets.

@mzsanford
Created November 19, 2013 21:08
Show Gist options
  • Save mzsanford/7552612 to your computer and use it in GitHub Desktop.
Save mzsanford/7552612 to your computer and use it in GitHub Desktop.
Detecting the iPhone via CSS only
$iphone_5_aspect_ratio: 40/71;
$retina_resolution: 326dpi;
@media screen and (device-aspect-ratio: $iphone_5_aspect_ratio) and (-webkit-min-device-pixel-ratio: 2) {
/* iPhone 5, 5c or 5s with retina display */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment