Skip to content

Instantly share code, notes, and snippets.

@alexey-detr
Created May 30, 2014 10:08
Show Gist options
  • Save alexey-detr/1382e07ec1986a8d2e42 to your computer and use it in GitHub Desktop.
Save alexey-detr/1382e07ec1986a8d2e42 to your computer and use it in GitHub Desktop.
Media query for small screens
only screen and (-webkit-min-device-pixel-ratio: 1) and (max-device-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 1) and (max-device-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 1/1) and (max-device-width: 320px),
only screen and ( min-device-pixel-ratio: 1) and (max-device-width: 320px),
only screen and ( min-resolution: 96dpi) and (max-device-width: 320px),
only screen and ( min-resolution: 1dppx) and (max-device-width: 320px),
only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 640px),
only screen and ( min--moz-device-pixel-ratio: 2) and (max-device-width: 640px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (max-device-width: 640px),
only screen and ( min-device-pixel-ratio: 2) and (max-device-width: 640px),
only screen and ( min-resolution: 192dpi) and (max-device-width: 640px),
only screen and ( min-resolution: 2dppx) and (max-device-width: 640px),
only screen and (-webkit-min-device-pixel-ratio: 3) and (max-device-width: 1080px),
only screen and ( min--moz-device-pixel-ratio: 3) and (max-device-width: 1080px),
only screen and ( -o-min-device-pixel-ratio: 3/1) and (max-device-width: 1080px),
only screen and ( min-device-pixel-ratio: 3) and (max-device-width: 1080px),
only screen and ( min-resolution: 256dpi) and (max-device-width: 1080px),
only screen and ( min-resolution: 3dppx) and (max-device-width: 1080px)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment