D flip flop using transmission gates
When the clock is low, X follows whatever value D has continuously. However, M is isolated from X, and so Q holds whatever value is stored in the slave FF.

When the clock is high, W is isolated from D, but now M is connected to X, so now the value on X is transferred to Q.

There's a critical moment as the clock goes from low to high at which X stops following D. If D is changing at this time, it's impossible to predict what value X will end up with &mdash; it could even become metastable. There's a certain amount of time starting before the rising edge of the clock and ending some time afterward, during which D must be stable in order to guarantee that its value is correctly transferred to Q; these are called "setup" and "hold" time, respectively.

Note that since the two transmission gates in the top row are never "on" at the same time, there's no way that D can ever directly affect the value of Q.

Does this anser the question?