I'm trying to achieve a short fading `\headrule` under page numbers. But I cannot figure out how to "flip" it on even/odd pages. Does anyone know how to manage that?

I also get a warning saying that the `headheight` is too small. This is caused by the `tikzpicture`, but how can I fix it? I don't want to increase the `headheight` by that much...

```
\documentclass[11pt, titlepage, openright]{book}

\usepackage[textwidth=13cm, left=2.5cm, bottom=2cm, top=2.5cm, paperwidth=20cm, paperheight=27cm, layoutwidth=19cm, layoutheight=26cm, layouthoffset=0.5cm, layoutvoffset=0.5cm, showcrop, asymmetric]{geometry}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{lipsum}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\fancyhead{}
\fancyfoot{}

\definecolor{grey}{rgb}{0.6,0.6,0.6}
\definecolor{darkgrey}{rgb}{0.4,0.4,0.4}

\setlength{\headheight}{24pt}
\fancyhead[RO]{\sffamily\bfseries\textcolor{grey}\leftmark\hspace{0.3cm}\sffamily\textcolor{darkgrey}\thepage}
\fancyhead[LE]{\sffamily\bfseries\textcolor{darkgrey}\thepage\hspace{0.3cm}\sffamily\textcolor{grey}\leftmark}
\renewcommand{\headrulewidth}{0.6pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\headrule}{
\begin{tikzpicture}
    \shade[white] (0,0) rectangle (8,0);
    \shade[left color=white, right color=black, dashed] (8,1) rectangle (12.98,1.01);
\end{tikzpicture}}

\begin{document}

\chapter{Test chapter}
\lipsum
\lipsum

\end{document}

```