in cases, that all nodes in some tikz
pictures have shadow. this can be done for example by:
every node/.style = {draw, fill=white, drop shadow},
problem arise, if i like to some of this nodes add labels. this labels also have shadows, which i not like to have. i try remove them with
no shadows/.style = {general shadow/.style=},
but this doesn't work (as i expected):
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{shadows}
\begin{document}
\begin{tikzpicture}[
every node/.style = {draw, fill=white, drop shadow},
no shadows/.style = {general shadow/.style=}, % should remove drop shadow, but not
every label/.append style = {label distance=1em, font=\scriptsize, no shadows}
]
\node[label=how to remove label shadow?] {node with shadow};
\end{tikzpicture}
\end{document}
edit: to make question and mwe more clear:
no shadows/.style = {general shadow/.style=},
is taken from Qrrbrbirlbel answer on question here described in code Ahis solution in code B i didn't test since it require (as i understood code) that
\makeatletter \tikzset{no shadows/.code=\let\tikz@preactions\pgfutil@empty} \makeatother
should be in preamble, what for some reasons not like to have
- the solution should be applied to all labels, i.e. it can be used as styles options in
every label/.append style = {<other style's definitions>, no shadows}
-now i wonder why solution of [Qrrbrbirlbel] works in code example A whereno shadows
is option ofchild
and not of node. in case, that i move it to node, also this code doesn't work correctly.
so far elegant solution provided by Torbjørn T., which make label shadow invisible, fulfill all my expectations. in time of this writing the solution of marmot is still in progress/evolution.