background-clip:text: Teks Bergradien

A letter stencil over a dyed cloth: write the gradient text recipe, the browser paints its three layers and reads its own paint, and Mr. Harun’s old phone…

Why it matters

Gradient headings are on many landing pages. The recipe is short, but every line has a job: without a see-through fill the gradient does not show, with a block box its colours are wasted on empty space, and without @supports the heading can vanish in a browser that cannot clip to text.

The key idea

Three layers: the background clipped to the letters, then the letters’ fill painted on top

Common mistakes

Try it in this playground