Design system governance
Four buttons, all named Button.
The parser resolves every consumer of a component before it reports a single finding, so severity is measured in teams affected rather than in files touched.
Tools — 09
One layer looks like a sticker. Two layers — a wide ambient wash and a tighter contact shadow — read as an object on a surface. Build it here, on a card that actually belongs to this site, so you can see whether it fits the brand rather than whether it fits a grey square.
Brand presets
Preview
Design system governance
The parser resolves every consumer of a component before it reports a single finding, so severity is measured in teams affected rather than in files touched.
border-radius: 0px;
box-shadow: 0px 2px 8px 0px rgb(0 22 25 / 8%), 0px 12px 32px -8px rgb(0 22 25 / 12%);A convincing CSS shadow uses two or three stacked box-shadow layers, not one: a tight, near-opaque layer for contact and one or two wider, fainter layers for ambient light. box-shadow accepts a comma-separated list, drawn first layer on top.
Because real shadows have two components. A small dark region where the object nearly touches the surface, and a broad soft region from ambient light — one blur radius cannot be both.
A single 0 4px 12px shadow at 20% opacity reads as a grey smudge. The same total darkness split across a 1px contact layer and a 16px ambient layer reads as elevation.
In order: horizontal offset, vertical offset, blur radius, optional spread radius, then colour. The blur radius softens the edge; the spread grows or shrinks the whole shape before blurring.
Keep the horizontal offset at 0 for interface elevation. A sideways shadow implies a light source to one side, which is only consistent if every shadow on the page agrees with it.
The shadow follows the border box, so it inherits the radius automatically. The mistake is nesting: a child inside a rounded parent needs a smaller radius than its parent, not the same one.
The rule is that the inner radius equals the outer radius minus the padding between them. Equal radii make the gap between the two curves appear to pinch.
A static box-shadow is cheap. Animating one is not, because the browser repaints the blurred region on every frame.
To animate elevation, cross-fade the opacity of a pseudo-element that carries the larger shadow. Opacity is compositor-friendly; blur radius is not.