In Firefox’s Quirks (backward compatible) mode, hashless colour codes like
#666666, and unitless lengths like
10px, are automatically corrected by the CSS parser if such errors are found in the value of properties except shorthands. The Firefox implementation has been updated to allow such errors only for specific properties to follow the CSS3 spec.
For example, hashless colour codes are only allowed in the value of the
color properties, while the value of the other properties like
border won’t be corrected. Anyway, you should fix your errors yourself.