There is a specific kind of frustration that every front-end developer has experienced: a design concept that looks perfect in a mockup but falls apart the moment it hits a real browser. The blur is not quite right. The shadow feels heavier. The spacing does not breathe the same way. The type renders differently on Windows. And suddenly, the visual quality that made the concept appealing in the first place has evaporated.

This is not a skill problem. It is a translation problem, and understanding why it happens makes you better at both design and implementation.

The Mockup Has No Constraints

Design tools operate in a fundamentally different rendering model than browsers. A Figma frame has infinite precision, consistent anti-aliasing, perfect sub-pixel rendering, and no layout engine to negotiate with. When a designer places an element 8.5 pixels from the left edge with a 0.75px border and a Gaussian blur at 40% opacity, the tool renders it exactly as specified.

Browsers do not work that way. CSS pixels map to device pixels through a density ratio. Sub-pixel values get rounded, sometimes differently per property and per browser. Borders snap to whole pixels on some displays. Blur algorithms differ between rendering engines. The “same” visual specification produces different results because the rendering environment has different rules.

Shadows Are the Biggest Offender

box-shadow in CSS is the single property most likely to disappoint when translating from a design tool. Design tools apply Gaussian blur to shadows with high precision and consistent behavior. CSS box-shadow uses a different blur algorithm that varies across browsers and is affected by the element’s stacking context, border radius, and compositing.

The practical result: a shadow that looks soft and natural in Figma often looks heavier and more defined in Chrome, and slightly different again in Firefox. The fix is not to match the exact shadow values from the design file. It is to tune the shadow values in the browser until they achieve the same visual weight and feel. This is a judgment call, not a measurement task.

Font Rendering Is a Moving Target

The same font, at the same size, with the same weight, renders differently across macOS, Windows, and Linux. macOS applies heavier anti-aliasing by default, making text appear bolder. Windows ClearType rendering is sharper but can make the same font look thinner. Linux rendering varies by distribution and font configuration.

Design mockups are typically created on macOS, which means the typographic weight that looks right in the mockup may look light on Windows. The -webkit-font-smoothing: antialiased declaration helps on macOS by reducing the heavy anti-aliasing, but it does nothing on other platforms.

The pragmatic approach: test on macOS and Windows. Adjust font-weight values if necessary for critical text. Accept that pixel-identical cross-platform rendering is not achievable and aim for equivalent visual quality instead.

Layout Engines Are Opinionated

CSS Grid and Flexbox are powerful, but they make their own decisions about sizing, alignment, and overflow that sometimes conflict with design intent. A grid with auto sizing will distribute space based on content, not the designer’s proportional intention. Flexbox’s flex-shrink default of 1 means elements will compress in ways a static mockup never shows.

The fix is understanding the layout engine’s defaults and overriding them intentionally. Set explicit flex-shrink: 0 on elements that should not compress. Use minmax() in grid definitions to enforce size boundaries. Do not assume the layout engine will interpret your intent from the CSS. Tell it explicitly.

The Gap Is the Teacher

The gap between mockup and browser is not a problem to eliminate. It is a learning opportunity to mine. Every translation failure teaches you something about CSS rendering that makes your next implementation better. After enough translations, you start seeing design concepts and immediately knowing where the browser will push back. That intuition is what separates competent CSS developers from excellent ones.