Retina Display Handling
Retina Display Handling
Retina display handling encompasses design system strategies for supporting high-density screens that pack more pixels per inch than traditional displays. Apple’s Retina branding represents displays where individual pixels are imperceptible at typical viewing distances. Similar high-DPI displays exist across all platforms, requiring design systems to provide appropriately detailed assets and handle scaling correctly.
What Is Retina Display Handling
Retina displays double (2x) or triple (3x) the pixel density of baseline displays. A 44-point button that requires 44 pixels on a 1x display needs 88 pixels on a 2x Retina display and 132 pixels on a 3x Super Retina display. Without appropriate handling, graphics appear blurry as the system upscales low-resolution assets.
Retina handling involves providing multiple resolution assets, using vector graphics where appropriate, and ensuring text and UI elements render sharply at all densities. Modern design systems must treat high-DPI support as default rather than exception since most current devices use high-density displays.
The concept extends beyond Apple devices. Android devices range from mdpi through xxxhdpi (4x baseline). Windows supports various scale factors. Web browsers on high-DPI monitors need similar consideration. Cross-platform design systems address this entire spectrum.
How Retina Display Handling Works
Multiple resolution assets provide pixel-perfect graphics at each density. Image assets export at 1x, 2x, and 3x scales with appropriate naming conventions. iOS uses @2x and @3x suffixes. Android uses density-specific folders (hdpi, xhdpi, xxhdpi, xxxhdpi).
Asset Export Example:
Source: 24pt icon designed at 1x
iOS Asset Catalog:
- icon.png: 24×24 pixels (1x)
- icon@2x.png: 48×48 pixels (2x)
- icon@3x.png: 72×72 pixels (3x)
Android Drawables:
- mdpi/icon.png: 24×24 pixels
- hdpi/icon.png: 36×36 pixels
- xhdpi/icon.png: 48×48 pixels
- xxhdpi/icon.png: 72×72 pixels
- xxxhdpi/icon.png: 96×96 pixels
Vector graphics scale mathematically without resolution limits. SVG for web, PDF for iOS asset catalogs, and VectorDrawable for Android render sharply at any density without needing multiple assets. Vector formats suit icons, illustrations, and other graphics with clean edges.
Resolution switching serves different assets based on display density. CSS media queries like resolution and vendor-specific queries enable web applications to serve appropriate images. HTML srcset attributes allow browsers to select optimal image resolutions.
Text rendering benefits automatically from high-density displays. System fonts render using the full pixel density available. Design systems need not do anything special for text to appear sharp on Retina displays beyond using system text rendering.
Key Considerations
- Asset generation multiplies file counts and build complexity
- Vector assets may need alignment adjustment at specific sizes
- Photos and complex images still need raster versions
- Performance considerations affect which resolutions to serve
- Build pipelines should automate multi-resolution export
- Testing requires devices at multiple densities
Common Questions
Should design systems prefer vector or raster assets?
Vector assets suit graphics with clean geometric shapes, including most icons, logos, and illustrations. These graphics render sharply at any size and density without resolution-specific versions.
Raster assets suit photographs and complex graphics with subtle gradients or effects that vectors cannot capture efficiently. These assets need multiple resolution versions.
Hybrid approaches use vectors where possible and rasters where necessary. Icons typically use vectors. Photos use rasters. Complex illustrations might use vectors for structure with raster textures.
Build pipelines can generate multi-resolution rasters from vector sources. This approach maintains vector source files while producing the raster assets platforms require.
How do web design systems handle Retina displays?
CSS resolution media queries adjust styles based on display density. Different background images can load for different densities.
HTML srcset and sizes attributes enable responsive image selection. Browsers choose appropriate images based on display density and viewport size.
SVG elements scale automatically to display density. Inline SVG or SVG images render sharply without special handling.
Icon fonts render as text, benefiting from high-density text rendering. However, icon fonts have accessibility and alignment limitations compared to SVG icons.
CSS transforms and canvas drawing use high-density rendering when available. Setting appropriate canvas dimensions ensures sharp canvas graphics.
What performance implications exist for Retina handling?
Higher resolution assets have larger file sizes. 2x assets are roughly 4x larger than 1x assets (2x2 pixel dimensions). 3x assets are roughly 9x larger. This affects download times and storage.
Resolution selection prevents unnecessary downloads. Serving 1x assets to 1x displays and 3x assets only to 3x displays optimizes bandwidth usage.
Lazy loading defers high-resolution image loading until needed. Images outside the viewport need not load immediately at full resolution.
Vector formats often have smaller file sizes than equivalent high-resolution rasters. An SVG icon may be smaller than a 3x PNG version despite infinite scalability.
Compression and format selection optimize raster assets. WebP and AVIF formats offer better compression than PNG and JPEG, reducing high-resolution asset sizes.
Summary
Retina display handling ensures graphics appear sharp on high-density screens through multi-resolution raster assets and vector graphics. Design systems must address asset generation workflows, platform-specific asset organization, and performance optimization for high-resolution assets. Modern applications should treat high-DPI support as default given the prevalence of Retina-class displays across all platforms.
Buoy scans your codebase for design system inconsistencies before they ship
Detect Design Drift Free