[css-syntax] Use validation functions to simplify the number/number-rest/number-fraction states.