Design and Layout knowledge for engineer

『[エンジニアでも知っておきたいデザインの基礎知識](https://qiita.com/laineus/items/c43d302e974380993fca) 』の英語版です。
もしよければ英文の編集リクエストもお願いします。

# Target readers

This is design knowledge that you can use when need to coding based on wireframe.

You don't have to read this article if you have a Design mock.

(This isn't an idea for creating a new design.)

# Outline 

When you write HTML code, you may not receive Design mock, because lately web sites are simple design.

This article is written about that case with example.

Design isn't made of only aesthetic taste. Many bad design cases are logically explained why they look dirty.

# Example

Now, You need to coding a new partial for the existing website without design mock.

You got a following wireframe.

Design of the new partial should be followed to the existing website.

`existing website` is Qiita in this example.

![sample_en.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/96fc9a00-2ac1-f91d-5c44-0798b6137a4a.png)

Then, this is a Bad design made by engineer.

![ss1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/eaf18b8e-c3dd-d4d3-6a33-85e9c2485546.png)

You might can't understand about why is it `Bad`.

Let's try to check before read below.

-

-

-

-

-

## Invisible lines

Each elements should be aligned to the invisible lines.

![ss1_fix.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/7ea16e0c-feb0-021a-34a3-7189d0e1a379.png)

I made it visible. Let's make marked elements align to the red lines.

![ss2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/7a9c0180-017b-ee03-2b30-996fdb6e8081.png)

Now fixed all. I removed red lines, But maybe you still can see invisible line.

## Groups

![ss2_fix1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/1ac9fec2-e8cf-d4e8-7430-4e52baeeeb07.png)

Term1 and Desc1 must be same group, but they don't look so.

![ss2_fix2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/099f4591-fa54-498c-c000-ba71e7cadf96.png)

Let's make `margin between groups` bigger than `margin between elements inside of group`.

![ss3.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/e2ada867-d7c2-25e1-5869-f80d9d61318d.png)

You should think about groups before adjust margin.

## Contrast

The heading already bold.

I believe the description should be more smaller than the heading.

![ss3_fix.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/ec88d52e-30c6-c825-1f2d-3a27fd7ee6b6.png)

I made description 1px small and made color lighter.

Description strength should be around 60~80% of the heading.

![ss4.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/0367a51c-1f05-3f04-7057-93d34c3d65b5.png)

Now you can read the headings easily.

## Change color brightness

This BG color isn't bad, but it is different as the theme color.

![ss4_zoom.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/baf62574-4eee-1c7b-3e4d-e2e0590dd68e.png)

The theme color includes a little yellow. The Bad color includes a little blue.

![ss4_fix.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/8118cf69-04c3-e7cb-e52b-ed666441d2f4.png)

Even if you can't understand those difference, it is OK.

First, The `Hue` of the color must not be changed.

For that, you can use a color picker kind of this.

![color_picker.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/cdcab3a6-0713-8213-b698-d19c6c349c10.png)

The rightmost indicator is `Hue` adjuster. Please don't change it.

The leftmost square map is chroma and brightness adjuster.

If you want to make BG, need to move it to left top than original color.

![ss5.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/dd214bd7-db7c-5d02-09df-476a0daa42a6.png)

Now, it is correct `Hue` BG.

## Good effects

You needed to apply drop shadow, but it is too strong.

![ss5_fix1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/7a25cc02-cf2e-febc-8eac-302f629625a5.png)

Let's make it weakness.

![ss5_fix2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/3e6d5e36-a08c-25fa-89f3-dc2a6ea4d234.png)

This is difficult adjustment.

The effects should be `You can barely see the effects`.

## Fixed all

![ss6.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/151137/e14d33c0-437c-c697-7c8d-a96b4a637d35.png)

I showed minor adjustment in this article.

You can fix it if you can notice my first example is Bad and why is it Bad.