Every property accepts only certain value types: width takes a <length> or <percentage>, transition-duration a <time>, background-image an <image>. A value of the wrong type makes the declaration invalid, and the browser silently drops it and keeps whatever the cascade produced before (CSS Fundamentals).
Three syntax rules apply everywhere. A unit follows its number with no space (10px, never 10 px). Only a zero length may omit its unit (margin: 0); times, angles and resolutions may not (0s, 0deg). Keywords such as auto and the global keywords of Default Values are case-insensitive and never quoted.