Why your developer hates your "optical alignment."

I am going to tell you a secret that will save you hours of arguments with your engineering team.
Designers see shapes. Developers see boxes.
When you open Figma, you look at your UI and see a universe of geometry. You see rounded corners, organic blobs, floating text, and perfect circles. You see art.
But when a developer looks at your design, they see The Matrix. They don't see a "User avatar circle." They see a square <div> with a border-radius: 50%. They don't see a paragraph; they see a rectangular container filled with text.
The moment you accept that everything on the web is a rectangle, you stop designing pictures of website and start designing actual software.
Here is how to stop fighting the browser and start thinking inside the box.
The biggest fight usually happens over optical alignment. In Figma, you measure 8px from the tip of an arrow icon to the text next to it. it looks perfect.
But in code, that arrow is an SVG sitting inside a square container. If you measure from the visual edge, you might be asking for 8px, but the developer sees 12px because of the invisible padding inside the icon's box. You are effectively asking them to break the grid to match your eyes.
To a designer, white space is just empty pixels. It doesn't matter where the space comes from, as long as things are apart.
To a developer, space has ownership. It is either Padding or Margin.
Think of it like a winter coat.
Padding is the coat itself. It is part of you. If I poke you, I hit the coat first. Padding increases the click area of a button.
Margin is social distancing. It's your personal bubble. It pushes other people away, but it isn't part of you. Margin does not increase the click area.
If you want a button to be easier to tap, you need Padding. If you just want it to sit further away from the text, you need Margin. Don't mix them up, or your developer will cry.
This is where pixel-pushing goes to die. In graphic design, text is ink on paper. In CSS, text is a box defined by line-height.
If your font size is 16px, but your line-height is 24px, your text lives inside a 24px tall invisible box. The text floats in the middle. If you measure 16px from the baseline of the text to the next element, you are fighting the box model. The developer has to stack the boxes, not the baselines.
Designers love eyeballing things. We nudge a logo until it feels centered. "Move it 3 pixels right. Actually, maybe 2.5 pixels."
Browsers hate decimal. When you hand off a design that requires an element to be at x:10.43px, the browser has to guess. It tries to render a fraction of a pixel, which usually results in a blurry edge or a jittery animation.
Thinking in boxes doesn't mean your design has to be blocky and boring. It just means you understand the canvas you are painting on.
When you hand off a design that respects the Box Model, you aren't just giving the developer a picture. You are giving them a blueprint. And that is the difference between a designer and a decorator.
0
0
0