## Background

Epigraphs are in a box with rounded corners. The boxes have a drop-shadow.

## Problem

The code for Picture #1, which is relatively simple, resembles:

\tikzstyle{epibox} = [
draw=epigraphbordercolour,
top color=epigraphfillcolour!40,
bottom color=epigraphfillcolour!5,
very thick,
rectangle,
rounded corners,
inner sep=10pt,
inner ysep=15pt
]


## Question

How do you make a drop-shadow fade out using Tikz, such as Picture #2?

You could use the pgf-blur package, which gives you this:

The shadow fading is not continuous, like in the previously accepted answer. It fades in a number of discrete steps, but that number can be changed, see the documentation.

Here's the code for the examples:

\documentclass{article}
\usepackage{tikz}

\usetikzlibrary{shapes.symbols}

\begin{document}

\begin{center}
\begin{tikzpicture}
top color=blue!40,
bottom color=blue!5,
rounded corners=6pt,
] {\sffamily\bfseries\large A pretty box};

top color=blue!40,
bottom color=blue!5,
rounded corners=1pt,
] at (5,0){\sffamily\bfseries\large Another pretty box};
\end{tikzpicture}
\end{center}

\end{document}


Edit

Sometimes, PDF renderers will show a dark line in the center of the shadow. This is due to the way they handle anti-aliasing and clipping. To avoid this:

1. Use pgf-blur v1.01, which tries hard to hide this artefact
2. In Acrobat, turn off the "Page Display" preference "Enhance thin lines". These shadows consist of many thin lines, and they won't look good if Acrobat changes their width
3. Don't use too many blur shadow steps. It looks best if you have about two pixels per step at viewing resolution.