$\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\dd}{\, \mathrm{d}}$
How many arguments does $C$ have? If the only argument to $C$ is $Y_D$, then $C_Y$ and $C_\tau$ might not make sense.
I think it's easy to get yourself in trouble here.
Suppose that $C$'s only argument is $Y_D$. Yet, we want to impose the restriction that $Y_D = Y(1-\tau)$. Well, as you wrote
\begin{align*}
\dd C = C_{Y_D} \dd Y = C_{Y_d} (1-\tau) \dd Y - C_{Y_D} Y \dd \tau
\end{align*}
is correct. But what is $C_Y$ and $C_\tau$? Well, technically,
$$
\pd C Y = \pd C \tau = 0.
$$
This is because $Y$ and $\tau$ do not directly affect $C$.
I guess what you have in mind is something similar to the following.
Suppose you define a function $f$ such that
$$
f(Y, \tau) = C(Y(1-\tau)).
$$
Then
\begin{align*}
f_Y &= \pd f Y = \pd C {Y_D} (1-\tau) \\
f_\tau &= \pd f \tau = -\pd C {Y_D} Y.
\end{align*}
So, really, $C_Y \neq f_Y$ and $C_\tau \neq f_\tau$, because $C_Y$ and $C_\tau$ are both equal to zero.