If you are using this special normal vector for a surface S defined by z = f(x, y), then
<br />
dS = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 + \left(\frac{\partial f}{\partial y}\right)^2 + 1} dy dx<br />
Also, the unit normal is
<br />
\hat{n} = \frac{\left\langle -\frac{ \partial f}{\partial x}, -\frac{ \partial f}{\partial y}, 1 \right\rangle }{\sqrt{\left(\frac{ \partial f}{\partial x}\right)^2 + \left(\frac{ \partial f}{\partial y}\right)^2 + 1}}<br />
This means that
<br />
\hat{n} dS = \left\langle -\frac{ \partial f}{\partial x}, -\frac{ \partial f}{\partial y}, 1 \right\rangle dy dx<br />
As you can see from the derivation, this is only true for this particular type of normal vector. This has nothing in particular to do with the Stokes theorem and can be used in any formula that includes the term \hat{n} dS where you can write the surface S as the graph of a function of two of the Cartesian coordinates. Ie., z = f(x, y), y = f(x, z) or x = f(y, z).