Mr. Harun’s sign under the Sanggar’s lamp: type a layered box-shadow, the browser rewrites its value, and the shadow’s edge, blur band and reach come from the…
Why it matters
Shadows are on every card, button, modal and dropdown. A good one (layered, see-through, soft) and a rough one (one solid black layer) look very different. Knowing offset, blur and spread keeps elevation consistent, and tricks like a focus ring or a bottom-only shadow become easy.
The key idea
Spread changes the shape, blur changes the edge
Common mistakes
A single-layer solid black shadow looks muddy Use a dark colour at low alpha, and stack 2 to 3 layers: one close and sharp, one far and soft.
Hover with an animated box-shadow feels janky Every frame repaints the shadow. Put the hover shadow on a pseudo-element and animate only its opacity.
Forgetting spread can be negative A negative spread shrinks the shadow’s shape before the blur: the key to a "tucked" shadow, or one that shows on one side only.
Try it in this playground
Move offset-y and blur offset-y gives the direction it falls; blur gives softness. Small y + medium blur = a gently floating sign.
Make a negative spread yourself The dashed line shrinks inside the sign: the shadow’s shape shrinks before it is blurred.
Switch the direction to inset The shadow moves inside the box: a pressed look, for inputs or active buttons.
Add a second layer Two shadows stacked, comma-separated. The secret of great shadows: many thin layers, not one thick one.