How does Intellij code inspection decide on selectors from .css files?

Solution 1:

The IDE only looks for CSS selector usages in stylesheets and HTML files/fragments; it won't inspect plain text files and files of unknown type. I've just checked - CSS usages are correctly found in Velocity templates:

enter image description here

Make sure to add *.vtl pattern to Velocity Template file type in Settings | Editor | File Types