# Why ' every label/.style={draw}' also fills?

Please look at next code and its result:

\documentclass[tikz,border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}[every node/.style={draw=red,fill=green},]
\node[label=above:a] (A) {AAA};

\node[label={[draw]above:b}, right=of A] (B) {BBB};

\begin{scope}[every label/.style={draw}]
\node[label=above:c, right=of B] (C) {CCC};
\end{scope}
\end{tikzpicture}
\end{document}


I understand that labels are nodes which are created after its main node. (Look at Every non-label node in TikZ), so I understand that options draw or fill inherit main node colors as is shown in middle node. But I don't understand why every label/.style={draw} also fills the label, as is shown in right most node above. Could you explain it?

• You might want to append style to \begin{scope}[every label/.style={draw}]. – Claudio Fiandrino Sep 2 '13 at 9:15

This happens because by default, every label is defined as draw=none,fill=none. By setting every label/.style=draw, you're overwriting these options, and the fill=green from the every node style is used. To get the expected behaviour, use every label/.append style=draw.