Skip to main content

Blog Post

Pixel 'Perfection' Front-End Development

by Tobias Williams
August 3, 2016

What is 'pixel perfect'?

Pixel perfection is when the finished coded page and the design file are next to each other, you can not tell them apart. To quote Brandon Jones : precise, so pristine, so detailed that the casual viewer can’t tell the difference.

TL;DR for achieving pixel perfection 

  • Review design files with an eye for extreme detail.
  • Establish relationship with designer.
  • Use a style guide.
  • Use the Pixel Perfect chrome plugin.

Begin by Reviewing Design Files 

From the beginning of the development process we need to have the final pixel perfect product in mind. The first step is to ensure that you have all of the design files you need for all of your deliverables. Often these are provided in threes: mobile, tablet and desktop. Not ideal for a fluid universe, but often the standard. If there are gaps in the files provided, ask for these, noting the areas that are missing.

Ideally these files are provided in a raw format. Whether psd, ai, or sketch, you will be able to open the files and inspect the individual elements. Access to these elements will allow you to measure sizes, get font information and extract other metadata that is not available in a flat file.

Some areas of focus for the raw files:

• Note font families, and also the variants. For example, “Roboto - bold” is slightly different than “Roboto Condensed - bold”. You might address this by only loading Roboto, and using a css rule to replicate the condensed spacing, however it will not be exactly the same as loading the font that was used in the comp.

• If the designer used a grid, they might have included the guides. Toggle the guides on (often under 'view') to see if you can get visual help with your grid.

• Hex colors can be extracted by using the native tools.

• Look for margin and padding values that can be applied to the page/panel templates.


If there are any inconsistencies, it is a good idea to raise these with the designer. Doing this early in the process can reduce rework and save you time closer to site launch.

Pixel perfect front-end development is made a lot easier though the use of a style guide such as KSS or Pattern Lab. When you are creating a style guide, you are abstracting parts of the page. Creating components this way allows you to think in terms that are complementary to pixel perfect results. You will be keenly aware of items that require specific css rule overrides that differentiate them from the rest of the site styles.

Perform Testing with the Pixel Perfect plugin for Chrome

This plugin allows you to overlay images over the current webpage. This is ideal for testing your work. You can upload several images to one page, adjust opacity and scale. This can be used for your peace of mind, but also it allows you to take screen shots for times that there are uncertainties over the results. I use this daily.

pixel perfect

Pixel Perfect Design Resources

Some references that I have found to be helpful toward achieving pixel perfect design include:

Connecting the Dots

In summary, this process is best started early.  A good foundation will significantly reduce the amount of work you are doing. Pixel perfection can be frustrating, by using these tools you can reduce the amount of back and forth that can occur.

Meet team member, Tobias Williams

In his role as Director of Front End Development at Mediacurrent, Tobias Williams strives to learn something new every day, and keep an open mind to new methods for front-end solutions. He has eight years of experience as a Drupal designer and developer.

Tobias is a University of Southampton History Graduate. In 2005, he moved from the UK to the US and began working for a digital media publishing company. He became a Flash designer, and discovered that he loved the relationship between design and development. Tobias built his first Drupal 5 site in 2008 to house his Flash portfolio, and was hooked on the CMS. In his role as a Flash Developer, he continued to design and build Drupal sites in his spare time. In 2011, he took a position as a web developer for an established regional newspaper where he continued to hone his Drupal skills.

When he’s not busy attending Drupal events (he owns a Drupal t-shirt for every day of the week, for several weeks), Tobias enjoys working on home repair projects, playing with his extensive collection of board games, and home brewing beer with his wife.

Learn more about Tobias >

Related Insights