Mostly impulse, sometimes by the pattern. If it's a fabric I just love, I'll stash it. If I have a pattern or project that I need to make I'll buy specific fabric to make it. Now that I have a decent stash, I'm finding that I have most of the fabric I need to make a specific pattern.
I have yet to make a quilt using the same fabric as the pattern, and a lot of times I dont' even use the same color-way.