The law of definite proportions, also known as the law of constant composition, states that a pure chemical compound will always contain the same elements in the same proportion by mass, regardless of how it is made.
This law is true for any sample of a compound, regardless of its amount or phase (solid, liquid, or gas).