I think there are broadly two types of problems - ones where you get partial credit, and ones where you don't. The restaurant example is one where you don't get partial credit - 98% of food being safe isn't enough, it's all or nothing. Paying your employees - all or nothing, you miss a paycheck once, it's a huge problem.
CSS on a website, however, you CAN get partial credit (to an extent). It may not be perfect, but it's at least theoretically still providing some value partially.
I think knowing what kind of problem you're facing is really important when it comes to measuring percentage of "complete".