[css-syntax] Simplify the dimension state with the escape validity checker.