Checkout my CSS Grid By Example and Getting Started With React video courses on Skillshare. Sign up now and get one free month of Skillshare.

You should not aim for pixel perfect

Mobile destroyed the concept of pixel-perfect design. Why we don't need to strive for a 100% pixel perfection in a design implementation?

What is pixel-perfect desing?

For so many years, the state of the art for front-end developers was “pixel-perfect designs.”

So, what was considered pixel-perfect? In a nutshell, a design implementation was seen pixel-perfect when the rendering of that web page (UI) totally matched the pictures provided by the design team.

The design template was having a 15px margin. Well then, the developer should integrate exactly the 15px. The width was supposed to be 300px, then the implementation need to do exactly that.

Why pixel perfect designs are not possible anymore?

In general using pixels in CSS is not a great idea, but trying to emulate a full pixel-perfect design these days is maybe a path to hyper frustration.

Keep in mind that we have a billion different mobile devices, each with its own resolution. For example iPhone devices have safe areas, folding or dual-screen devices, many phones have different DPI's and muuuuuch more.

Unless you have very serious reasons, forget about the rigidity of the pixel-perfect design. If we still follow pixel-perfect rules, the result will look like a foreign design in some of the various screen sizes, and provide a bad experience.

We now have options such as variable fonts, relative CSS units, (min-max functions)[http://www.js-craft.io/blog/making-css-responsive-with-the-clamp-min-and-max-functions/] and many others that we can use to make adaptive designs that work and look great on any type of device. Overall use the design as a guideline, a map, but don't strive for the perfect pixel output.

Home Screencasts Best of Newsletter Search X