The rule works properly. Your code is broken. Why? SonarCSS support analysis of CSS code. You code is not a valid CSS code (checked by CSS Validation Service):
You have a file with “some” code and css extension. I think you were lucky that the analyzer was able to parse the file instead of ended the analysis with parse error.