Only match valid CSS

Invalid CSS should be ignored