Skip to content

Instantly share code, notes, and snippets.

@stdavis
Created February 9, 2013 19:17
Show Gist options
  • Select an option

  • Save stdavis/4746644 to your computer and use it in GitHub Desktop.

Select an option

Save stdavis/4746644 to your computer and use it in GitHub Desktop.
iOS Device Media Queries
/* iPhone (3.5") portrait */
@media only screen and (device-height: 480px) and (orientation: portrait) {
}
/* iPhone (3.5") landscape */
@media only screen and (device-height: 480px) and (orientation: landscape) {
}
/* iPhone retina (3.5") portrait */
@media only screen and (device-height: 480px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
}
/* iPhone retina (3.5") landscape */
@media only screen and (device-height: 480px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
}
/* iPhone retina (4") portrait */
@media only screen and (device-height: 568px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
}
/* iPhone retina (4") landscape */
@media only screen and (device-height: 568px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
}
/* iPad portrait */
@media only screen and (device-height: 1024px) and (orientation: portrait) {
}
/* iPad landscape */
@media only screen and (device-height: 1024px) and (orientation: landscape) {
}
/* iPad retina portrait */
@media only screen and (device-height: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
}
/* iPad retina landscape */
@media only screen and (device-height: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment