The existing HTML/Razor intellisense for Visual Studio has a lot of limitations. It only works if your project is a web-based project, and does not support razor class libraries. It only scans for .css files in the wwwroot directory, and it doesn't support anything fancy like the relatively new isolated CSS feature for razor components.
This extension fixes all that, by improving the existing HTML intellisense with the following features:
Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=KevinMueller.HtmlCssClassCompletion22
After installing, the extension should scan for .css files automatically once all projects and the extension are fully loaded. You can see the progress in the bottom left corner.
If you add new css files, you can re-scan all files by using Tools -> Scan all Projects for CSS Classes.
The scanning also happens automatically every time you save a .css or .html file. This behavior can be turned off in the options under Tools -> Options -> Better Razor Css Class Intellisense.
You should now be able to use the intellisense:
Feel free to create an issue in this repo. :)