“‘Death to px, long live ch’ – a declaration of war on the traditional method of specifying widths in pixels and an embrace of CSS chips.”
— Dr Non
What happened
The article lays out a bold argument: traditional pixel widths are dying, replaced by CSS chips. Specifically, the author highlights the work of Danny Meyerowitz on his blog, where he explores this transition and advocates for a move away from relying on fixed-width units to define layout elements. He frames it as a reaction against the limitations of rigid pixel layouts that don't adapt gracefully to different screen sizes or resolutions.
Meyerowitz details how CSS chips (like rem or em) offer a more fluid and scalable solution, tied to the user’s root font size, allowing content to adjust proportionally across devices. He cites a preference for this method over strict pixel-based styling, as it promotes a truly responsive design.
Why it matters
The shift towards CSS chips represents a fundamental change in how websites are designed and developed. As mobile browsing continues to dominate, the need for responsive layouts—designs that adapt seamlessly across devices—becomes increasingly critical. Pixel-based designs struggle to accommodate this fluidity, often requiring tedious manual adjustments for each screen size. Embracing CSS chips aligns with modern design principles, providing a more adaptable and maintainable approach.
The author suggests this change is important because it promotes design systems based on scale, making websites easier to update and manage as content evolves.
The counter-take
The dominant narrative within the older generation of web development still heavily relies on pixel-based styling due to familiarity and perceived simplicity. This resistance stems from a lack of understanding of modern responsive design principles, often perpetuated by legacy codebases that are difficult to refactor. This established mindset persists despite demonstrable benefits in terms of flexibility and maintainability.
The AI angle
The move towards CSS chips and responsive design represents an upgrade in web development tooling to handle increasingly complex user interfaces. It creates an asymmetry where traditional fixed-pixel layouts are becoming obsolete, requiring developers to master a new set of techniques for creating adaptive designs that can scale effectively with screen sizes.
