# “\clip” conflict with “every path” in tikz package [duplicate]

I want every draw in magenta and every text in blue. Without \clip the following MWE does not produce any error.

\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\tikzset{%
every path/.style={magenta,text=blue}
}
\begin{document}
\begin{tikzpicture}
\clip (-2,-2) rectangle (2,2);
\filldraw (-3,0)--(1,1)--(3,-2)--cycle;
\end{tikzpicture}
\end{document}


But it does with the present of \clip. Is there any approach of avoiding putting style on each \draw?

• "But it does [produce an error] with [..] \clip" Which one exactly? – Martin Scharrer Dec 16 '17 at 9:19
• – wimi Dec 16 '17 at 9:28
• SayOL, the accepted answer to the question linkedby @javi_gg1 above should fix it. – Martin Scharrer Dec 16 '17 at 9:29