OK, it may seem stupid, but I often have tikz nodes inside a tikz environment inside a tikz node.
When the outer node has parameter minimum width set to non zero, it appears the inner node inherits this setting:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{m/.style={draw, minimum width=2cm}}
\tikz\node[m]{(\tikz\node[fill=yellow]{Hello};]};
\tikz\node[m]{(\tikz\node[fill=blue, minimum width=0]{Hello};]};
\end{document}
While I know that color of the outer node is applied to the inner node, this does not fall under the qualification of "inheritance". Other common settings (fill, draw, text, inner sep, outer sep) don't seem to be inherited either.
Is this documented? Are there other settings behaving the same way? Is it avoidable without force-setting minimum width for the inner nodes?
Context
To give my question some substance, I define a command \textnode that transforms any text into a tikz node, allowing for easy highlighting, overlaying, etc.
tikzpictureenvironments is not supported. Period. If it works, that's happenstance and you can expect it to break with a future update. If you nest them, all bets are off. You just shouldn't do this. – cfr May 28 '17 at 20:46tikzmark's\subnodeif you need to mark nodes within nodes. Or\tikzmarkoutsidetikzpictures, for arbitrary text. – cfr May 28 '17 at 20:53tikzmark's manual more thoroughly, havn't noticed that command. – Christoph Frings May 28 '17 at 20:56\subnodeis very easy to use and was designed for exactly what you want to do :-). – cfr May 28 '17 at 20:58