Trying to write a manual for products and faced a problem.
Stir 30 g powder in 300 ml water.
OR
Stir 30 g powder in 300 ml of water.
Trying to write a manual for products and faced a problem.
Stir 30 g powder in 300 ml water.
OR
Stir 30 g powder in 300 ml of water.
The most compact way to express the instruction is as follows:
Stir 30g powder into 300ml water
Compactness is especially useful in recipe lists, where getting each instruction onto a single line can improve the list's clarity. But you would also be understood (and consistent) if you expressed the instruction as follows:
Stir 30 grams of powder into 300 milliliters of water
or if you adopted an intermediate form:
Stir 30 g of powder into 300 ml of water
You could even be inconsistent in your use of of and in your letter spacing before weight abbreviations and volume abbreviations:
Stir 30g powder into 300 ml of water
although copy editors and other tormented souls are likely to react badly to the gratuitous inconsistency of that approach.
The meaning of the instruction is clear in every one of the forms I have listed in this answer—so the issue isn't one of meaning or ambiguity but one of style or aesthetic appeal. On those points, I favor compactness and consistency; others, however, may care not a whit for either one.
Both are fine. I would only use the first one if you are writing bulleted points or steps in a process. If you are writing out a paragraph containing instructions in sentence format I would definitely go with the second "with of" option, which is ultimately better I think.
The first example makes “300 ml” sound adjectival, as though it were describing “water”. The second example, which uses a prepositional phrase, doesn’t make “water” sound as if it were being described, but rather as if one were describing what you’re pouring 30 g of powder into. The same goes for “30 g of powder.”