Usually the pattern first, but like everyone else if I see fabric that I like then I buy at least 1/2 to 1 yard. If I just absolutely LOVE it and might use it as the focal fabric in a quilt then I might buy up to 5 yards. If you are really struggling, then opt to buy a kit that already has the coordinating fabric and in the correct amounts. I made a wall quilt from a kit when I was a new quilter and it was so nice to not fret over the fabric...I just put all of my energy into making it! :-)