Screen Pixels and Breakpoints
When setting breakpoints for a responsive design, it is helpful to know what some common device sizes are. Here is a list of some common screen pixel sizes.
Some devices, like the iPhone with Retina screen, iPad Air, and Samsung Galaxy S4, report smaller screen sizes than their actual number of pixels. For example, the iPad Air reports a screen size of 768x1024, like other iPads, even though its actual pixel count is 1536x2048. The Galaxy S4 reports 1/3 its actual pixel count. This has the benefit that it allows web sites to display properly even if CSS might otherwise report a very large screen size.
Also, the whole iPad series has the anomaly that they always report the screen width as 768 pixels, even if the device is rotated to landscape mode. The change can be detected by checking the “orientation” in CSS media queries. The iPad can be detected pretty reliably by checking a combination of the device width, device height, and orientation, because it is the only device that reports width less than height even in landscape orientation. Note that it is important to check the device dimensions rather than the window dimensions.
There are media queries that let you check the pixel ratio and also the resolution:
- -webkit-min-device-pixel-ratio
- min--moz-device-pixel-ratio
- -o-min-device-pixel-ratio
- min-device-pixel-ratio
- min-resolution
Numbers in (parentheses) show the reported device size when different from the actual device size.
Device | Width | Height |
---|---|---|
Desktop | 1024 | 768 |
Desktop | 1680 | 1050 |
Desktop 1080 | 1920 | 1080 |
Desktop Cinema | 2560 | 1440 |
Desktop 4K | 3840 | 2160 |
iPhone 5 | 640 (320) | 1136 (568) |
iPhone 4 | 640 (320) | 960 (480) |
iPhone 3 | 320 | 480 |
iPad | 768 | 1024 |
Android sdpi | 320 | 426 |
Android mdpi | 320 | 470 |
Android ldpi | 480 | 640 |
Android xldpi | 720 | 960 |
Samsung Galaxy S3/4 | 360 | 640 |
Samsung Galaxy Note | 800 | 1280 |
HTC, LG Optimus, Nexus S | 320 | 533 |
HTC | 480 | 800 |
HTC | 540 | 960 |
LG Optimus Pad | 768 | 1280 |
MS Surface | 768 | 1366 |
Droid | 360 | 599 |
Nexus 4 | 384 | 598 |
Nexus 7 | 603 | 966 |
I have not listed some devices that have the same screen sizes as other devices already in the list. Some odd screen dimensions like 533 are probably 1600 actual pixels with a device pixel ratio of 3/1
Note that all the devices except those denoted “Desktop” can be turned sideways so that the height becomes the width. This gives us many more screen widths to deal with. Fortunately, most of the available screen widths fit into a few small ranges. These are:
Breakpoints | ||
---|---|---|
320 | 533-540 | 800-801 |
360 | 598-603 | 960 |
426-427 | 640-648 | 1024 |
470-480 | 768 | 1280 |
Where there is a small range of pixel sizes, which number you choose probably depends on whether your media queries use min-width (mobile first) or max-width (desktop first).