Multi-layer text-shadow
The CSS text-shadow property accepts a comma-separated list of shadows applied in order, with the first listed shadow on top. Stacking multiple shadows lets you compose effects that no single shadow could achieve: a neon glow is built from three or four overlapping blurred shadows in the same hue. An embossed effect is a tight bright shadow on one side and a tight dark shadow on the opposite side. A retro pop is a series of solid offset shadows in alternating colors.
Each shadow has four values: x offset, y offset, blur radius, and color. The CSS the Designer outputs lists all four for every layer of the chosen preset. The order matters: a tiny bright shadow at the top of the stack reads as a highlight; the same shadow at the bottom is hidden by the layers above it.
Performance considerations
text-shadow is rendered every paint, so heavy stacks (six or more layers, large blur radii) can affect scroll performance on lower-end devices. Static headings are painted once; for animated text (hover transitions, keyframe animations on the shadow), keep the layer count low.
Color contrast is the other consideration. Heavy shadows can reduce the effective contrast of the underlying text and push it below WCAG AA. The Designer shows the WCAG contrast ratio of your text and background colours as you edit; the shadow is not part of that number, so judge legibility by eye as well.
Common Use Cases
Marketing pages with a retro or 80s-inspired brand use the Designer to build the signature long-shadow letters for hero text. Gaming and esports sites use it for neon glow effects on team names and event logos. Editorial sites use the embossed preset to give pull-quote text a hint of dimension without distracting from the content.
Designers documenting a system in Figma can start from a preset's CSS when turning a shadow effect into a CSS token. CSS text-shadow has no spread value in browsers, so a design-tool shadow that uses spread will not match exactly; compare the rendered result before committing the token.
What the Designer does, and a measured look at its presets
Start from one of seven presets (neon, embossed, retro, glitch, longShadow, outline, soft) or from a value you paste into Import, then edit every layer: X and Y offset, blur, colour and opacity, on/off, move up or down, duplicate, delete, or add a new one. The first layer in the list paints on top, as in CSS. The preview uses the same value you copy, the contrast line measures your text colour against your background with the WCAG formula, and the notes under the CSS give the shadow's reach past the letters, the number of layers and blurs, and Firefox's 300 px blur cap when a blur goes past it. Shadows do not take up layout space, so a glow can spill out of its box and be cut off by a parent with overflow: hidden or run into the next element. On October 12, 2026 we rendered each preset in Chromium (72 px, weight 900) and measured how far the visible shadow reaches past the text element's box:
Shadows do not take up layout space, so a glow can spill out of its box and be cut off by a parent with overflow: hidden or run into the next element. On October 12, 2026 we rendered each preset in Chromium (72 px, weight 900) and measured how far the visible shadow reaches past the text element's box:
| Preset | Layers | Shadows | Visible shadow beyond the box |
|---|---|---|---|
| neon | 4 | 0 offset, blur 5/10/20/40 px | 28 px on every side |
| embossed | 2 | ±1 px, no blur | none (inside the box) |
| retro | 3 | 2/4/6 px diagonal, no blur | 2 px right |
| glitch | 2 | ±2 px horizontal | none |
| longShadow | 30 | 1…30 px diagonal, no blur | 26 px right, 19 px below |
- A blur reaches up to its radius. The spec draws the blur as a Gaussian with a standard deviation of half the radius; in our test a single 40 px blur was still faintly visible 41 px from the glyph, and the neon stack was visible 28 px past the text box. Leave about the largest blur radius as padding around glowing headings.
- The long shadow costs bytes, not just paint. Its 30 layers are about 1.1 KB of CSS for one declaration. If you only need a hard diagonal shadow, a dozen layers at 2 px steps look similar at heading sizes.
- Contrast is measured, the shadow is not. The embossed preset is #888888 text on #1A1A1A, which the tool reports as 4.90:1: AA for any size, AAA only for large text. WCAG compares the text colour with the background and ignores shadows, so a glow cannot rescue a failing pair, and a busy shadow can hurt legibility even when the pair passes.
- Animating between presets works. Browsers interpolate shadow lists layer by layer and pad the shorter list with transparent shadows, so a transition from 2 layers to 4 still animates smoothly rather than jumping.
- Checked on October 13, 2026. In Chromium we edited the neon preset through the controls (offsets, a blur, one opacity, moved a layer up, deleted, duplicated and added layers), applied the copied CSS to an element on a blank page and compared computed styles: copied = preview = the expected five-layer list. A pasted value mixing hex, rgb() with slash alpha and hsl() imported and copied back to the same computed shadow, and the contrast line matched the WCAG formula, truncated to 2 decimals, for 6 colour pairs.
Sources
Checked on .
- MDN: text-shadow (browser compatibility notes: Firefox caps blur at 300 px)
- MDN: box-shadow interpolation (shadow lists, transparent padding)
- W3C: CSS Text Decoration Module Level 3, text-shadow
- W3C: CSS Backgrounds and Borders Level 3, shadow blurring (Gaussian, σ = half the blur radius)
- W3C: Understanding WCAG 2.2 SC 1.4.3 Contrast (Minimum)