Design System Problems

Density Independent Pixels

January 15, 2026 • 5 min read

Density Independent Pixels

Density independent pixels (dp) are abstract measurement units that maintain consistent physical sizes across screens with different pixel densities. Android uses dp (also written as dip) as its standard unit, while iOS uses points (pt) for similar purposes. These units enable design systems to specify sizes that work correctly across the wide range of device screen densities in the market.

What Are Density Independent Pixels

Density independent pixels abstract physical pixel counts into units that represent approximately the same physical size regardless of screen density. On a baseline 160 dpi screen, 1 dp equals 1 pixel. On a 320 dpi screen, 1 dp equals 2 pixels. This abstraction ensures that a 48 dp button appears roughly the same physical size on both screens.

Without density independence, interfaces designed for low-density screens would appear tiny on high-density screens (same pixels, smaller physical area), and vice versa. Early Android development suffered from this problem before density independent measurement became standard.

iOS points serve the same purpose as Android dp. On non-Retina displays, 1 point equals 1 pixel. On 2x Retina displays, 1 point equals 4 pixels (2x2). On 3x displays, 1 point equals 9 pixels (3x3). Both systems achieve the same goal of density-independent sizing.

How Density Independent Pixels Work

Android defines density buckets that group similar screen densities. Applications provide resources for relevant density buckets, and the system selects appropriate resources for each device.

Android Density Buckets:

ldpi (low): ~120 dpi, 0.75x baseline
mdpi (medium): ~160 dpi, 1x baseline (1 dp = 1 px)
hdpi (high): ~240 dpi, 1.5x baseline
xhdpi (extra high): ~320 dpi, 2x baseline
xxhdpi (extra extra high): ~480 dpi, 3x baseline
xxxhdpi (extra extra extra high): ~640 dpi, 4x baseline

iOS Scale Factors:

1x: Non-Retina (legacy devices)
2x: Retina (iPhone 8, standard iPad)
3x: Super Retina (iPhone Pro models)

Design specifications use density independent units. Material Design specifies touch targets as 48dp, icon sizes as 24dp, and spacing in 8dp increments. These specifications apply regardless of actual device density.

Asset generation produces density-appropriate versions. A 24dp icon requires 24px at mdpi, 36px at hdpi, 48px at xhdpi, 72px at xxhdpi, and 96px at xxxhdpi. Design tools and build systems automate this asset multiplication.

Token systems can work in density independent units. A spacing token of 16 means 16dp on Android and 16pt on iOS. Transformation pipelines output appropriate unit annotations for each platform.

Key Considerations

Common Questions

How do design tools handle density independent units?

Modern design tools like Figma work in density independent units by default. Design at 1x scale corresponds directly to dp and pt values. Designs created at 1x export correctly for all density buckets.

Export plugins generate assets at multiple densities from single source designs. A 24x24 icon at 1x exports as 24px, 36px, 48px, and so on for different density buckets.

Some designers work at 2x or 3x scale for detail precision. This approach requires careful conversion when specifying values for development. A 48px measurement at 2x scale equals 24dp.

Design system documentation should specify the scale used for designs and the expected density independent values for specifications. Confusion between pixels and density independent units causes implementation errors.

How does text sizing relate to density independent pixels?

Android uses sp (scalable pixels) for text rather than dp. Sp combines density independence with user text size preferences. A 16sp text specification renders larger than 16dp if the user has enabled larger text in system settings.

iOS points also scale with Dynamic Type settings. Text using system text styles scales according to user accessibility preferences.

Design systems should specify text in units that support accessibility scaling. Hard-coded pixel text sizes that ignore user preferences create accessibility failures.

Touch targets and non-text elements typically use dp/pt rather than sp. A 48dp button remains 48dp regardless of text size preferences, ensuring tappable areas do not become too small when text sizes decrease.

How do design systems communicate density independent specifications?

Specifications should clearly indicate units. “Button height: 48” is ambiguous. “Button height: 48dp” is clear.

Platform-specific documentation uses platform-appropriate units. Android documentation uses dp. iOS documentation uses pt. Web documentation might use pixels with rem/em for relative sizing.

Token values can be unitless in source definitions with platform-specific units applied during transformation. A spacing-medium token with value 16 becomes 16dp in Android output and 16pt in iOS output.

Visual specifications should show both the density independent value and representative pixel values at common densities. This dual specification helps both designers and developers understand expected sizes.

Summary

Density independent pixels (dp on Android, pt on iOS) enable consistent physical sizing across screens with different pixel densities. Design systems should specify all sizes in density independent units, generate assets for required density buckets, and use scalable units for text to support accessibility. Clear unit specification in documentation prevents confusion between abstract units and actual pixels.

Buoy scans your codebase for design system inconsistencies before they ship

Detect Design Drift Free
← Back to Cross Platform Consistency