Last active
August 9, 2016 12:40
-
-
Save waynebcox/02c6f9b5cbeb8bc4e444ea757009aad4 to your computer and use it in GitHub Desktop.
Media queries for popular devices including non-Apple devices and tablets (based on https://css-tricks.com/snippets/css/media-queries-for-standard-devices/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------- iPhone 5 and 5S ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 320px) | |
and (max-device-width: 568px) | |
and (-webkit-min-device-pixel-ratio: 2) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 320px) | |
and (max-device-width: 568px) | |
and (-webkit-min-device-pixel-ratio: 2) | |
and (orientation: portrait) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 320px) | |
and (max-device-width: 568px) | |
and (-webkit-min-device-pixel-ratio: 2) | |
and (orientation: landscape) { | |
} | |
/* ----------- iPhone 6 ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (-webkit-min-device-pixel-ratio: 2) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (-webkit-min-device-pixel-ratio: 2) | |
and (orientation: portrait) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (-webkit-min-device-pixel-ratio: 2) | |
and (orientation: landscape) { | |
} | |
/* ----------- iPhone 6+ ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 414px) | |
and (max-device-width: 736px) | |
and (-webkit-min-device-pixel-ratio: 3) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 414px) | |
and (max-device-width: 736px) | |
and (-webkit-min-device-pixel-ratio: 3) | |
and (orientation: portrait) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 414px) | |
and (max-device-width: 736px) | |
and (-webkit-min-device-pixel-ratio: 3) | |
and (orientation: landscape) { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------- Galaxy S5, S6, S7; HTC One ----------- */ | |
/* Portrait and Landscape */ | |
@media screen | |
and (device-width: 360px) | |
and (device-height: 640px) | |
and (-webkit-device-pixel-ratio: 3) { | |
} | |
/* Portrait */ | |
@media screen | |
and (device-width: 360px) | |
and (device-height: 640px) | |
and (-webkit-device-pixel-ratio: 3) | |
and (orientation: portrait) { | |
} | |
/* Landscape */ | |
@media screen | |
and (device-width: 360px) | |
and (device-height: 640px) | |
and (-webkit-device-pixel-ratio: 3) | |
and (orientation: landscape) { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------- iPad mini ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (orientation: portrait) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (orientation: landscape) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* ----------- iPad 1 and 2 ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (orientation: portrait) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (orientation: landscape) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} | |
/* ----------- iPad 3 and 4 ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (-webkit-min-device-pixel-ratio: 2) { | |
} | |
/* Portrait */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (orientation: portrait) | |
and (-webkit-min-device-pixel-ratio: 2) { | |
} | |
/* Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 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