Skip to content
OddsockLocal
Local
Layers: x y blur spread color (one per line)0 2 6 0 #20213455
Layers: x y blur spread color (one per line)0 2 6 0 #20213455
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Write each layer as x, y, blur, spread, and a hex color.
  2. Use an eight-digit color when the shadow should be see-through.
  3. Add a second line for a second layer.
  4. Paste the rule and look at it on the real page color. A shadow tuned on white can vanish on gray.

What is Box shadow?

A drop shadow is five numbers and a color, and most of the time people only remember the blur. This page wants the full order CSS uses: horizontal offset, vertical offset, blur, spread, then color. The opening layer is 0 2 6 0 #20213455, which compiles to box-shadow: 0px 2px 6px 0px #20213455. The shadow sits 2 pixels down, blurs 6 pixels, does not grow, and uses a translucent ink.

Read more

Spread is the part text-shadow does not have. A positive spread grows the shadow before it blurs, which is how you get a glow that starts outside the box. A negative spread shrinks it, which is how a soft shadow stays tight to a small button. Stack lines for a tight contact shadow plus a longer ambient one. Put the tighter layer first if you want it painted on top.

An eight-digit hex carries transparency. An opaque black shadow at a large blur looks like a hole in the page. Blur cannot be negative. Offsets can.

Use cases

  • A card gets a short drop so it lifts off a light page.
  • A button combines a 1px contact shadow with a wider ambient layer.
  • A focus ring is faked with a spread and zero blur, in a color that is not the only indicator.
  • A designer tries a negative spread so a small chip does not grow a huge halo.
  • A dark-mode panel uses a more transparent ink than the light-mode one.

A soft drop under a card

One line: 0 2 6 0 #20213455.

box-shadow: 0px 2px 6px 0px #20213455;

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

Box shadow has a spread length. Text shadow is only x, y, blur, and color. A five-number line belongs here. A four-number line belongs on the text page.