'Using an environment such as itemize in a tikz node shifts vertical alignment

If I use an environment in a tikz node, the vertical alignment is shifted. The following example shows the difference, in the first case, where no environment is used, everything is fine.

\begin{frame}

% alignment is correct without using itemize
\begin{tikzpicture}
\node[text width=\textwidth, text centered,fill=yellow, fill opacity=0.4,text opacity=1, rounded corners, inner sep= 0em, outer sep=0em]{test};
\end{tikzpicture}

% alignment is shifted vertically
\begin{tikzpicture}
\node[text width=\textwidth, text centered,fill=yellow, fill opacity=0.4,text opacity=1, rounded corners, inner sep= 0em, outer sep=0em]{\begin{itemize}
\item test
\end{itemize}};
\end{tikzpicture}

\end{frame}

img



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source