{"id":344337,"date":"2021-07-21T07:37:07","date_gmt":"2021-07-21T14:37:07","guid":{"rendered":"https:\/\/css-tricks.com\/?p=344337"},"modified":"2021-07-21T07:37:10","modified_gmt":"2021-07-21T14:37:10","slug":"a-step-by-step-process-for-turning-designs-into-code","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/a-step-by-step-process-for-turning-designs-into-code\/","title":{"rendered":"A Step-By-Step Process for Turning Designs Into Code"},"content":{"rendered":"\n

Turning website design files into a combination of HTML, CSS and JavaScript is the bread and butter of many front-end web development jobs, but there\u2019s a part of this work that doesn\u2019t neatly fit in to tutorials on any specific topic. There\u2019s a process of breaking down a design and figuring out how to approach the build that seems to fall under on-the-job training for new front-end developers. It\u2019s not something taught alongside core technologies (no matter where we are learning those technologies\u2014college, bootcamp, or on our own).<\/p>\n\n\n\n

In this post, we\u2019ll take a look at how to go from design to code, and why you might want to follow a process like this instead of just diving into code head-first\u2014which, let\u2019s face it, we love to do! The contents of this post are based on my experiences onboarding new developers, the kinds of conversations we\u2019ve had, and the help and feedback I\u2019ve provided in those situations.<\/p>\n\n\n\n\n\n\n\n

One reason the process of moving from design to code is a core professional skill for a front-end developer is that without having some way to dig in and predict how you will approach something, it\u2019s very difficult to provide an estimate for how long it takes to make or what questions you might need answered before you start.<\/strong> Many designs might appear simple at first glance, but quickly become complex once you get into the weeds. I\u2019ve seen this lead to overpromises, which often leads to tighter deadlines, stress and even worse side effects. Suddenly everything takes much longer than we initially thought. Yuck. Let\u2019s see if we can avoid that.<\/p>\n\n\n

Evaluating a design<\/h3>\n\n\n

As a way to talk about this, let\u2019s use an example design for a \u201cmarketing-style\u201d web page and assume we have been asked to implement it. We can also assume this site is created in a context where marketing professionals may come in and edit the content via some content management system (CMS), re-order the sections, replace images, and make style changes. So we need to decide on the components of the page that will be the building blocks used in the CMS.<\/p>\n\n\n\n

This gets at another reason that this can be missed in education: often in our own solo projects, we can have static content right there in the HTML, and component parts aren\u2019t going to be Frankenstein-ed together by strangers to form whole new pages and sections. But once you step into more real-world dev situations, things are a lot more dynamic, and we are often working at the layer of \u201cmake things that a non-developer can use to make a web page.\u201d<\/p>\n\n\n\n

\n
\n
\"The
Design made by and courtesy of my friend, Dan Ott<\/a><\/figcaption><\/figure>\n<\/div>\n\n\n\n
\n

Let’s use this website for a clinical trial is example. As we can see there are a lot of familiar design elements. Marketing sites tend to share common patterns:<\/p>\n\n\n\n