How to solve VS code CSS class selector not found with angular and bootstrap 5 beta.
Hello Guys. I am using bootstrap 5 and Angular. When I Added styles and script into my angular.json File VS Code is not recognize the bootstrap classes that I have defined.
So Here is I am Adding All Possible solution that I have tried to Solve This Error. Without Wasting your time, Let’s start this Article.
How This Error Occour ?
I am using bootstrap 5 and Angular. When I Added styles and script into my angular.json File VS Code is not recognize the bootstrap classes that I have defined.
Vs Code doesn’t Recognize classes that I have Defined. VS Code showing red error in classes. How to solve this error ?
How to Solve This Error ?
The solution To this error is to Uninstall Extension named “HTML CSS Support” And Then Reload. This Solution is Worked For me.
Question : VS Code CSS class Selector not found with angular and bootstrap 5 beta
Answer: The solution To this error is to Uninstall Extension named “HTML CSS Support” And Then Reload. This Solution is Worked For me.
Solution 1
- Open Extension manager by clicking on the Extensions icon in the Activity Bar.
- Now Just Find “HTML CSS Support” Plugin.
- Open This Plugin.
- Uninstall It.
- And Then Restart VS Code.

By Uninstalling “HTML CSS Support” This Plugin My Error Is Solved So This Solution Will Work For you too.
Solution 2
This Problem Is Due to “HTML CSS Support” This Plugin Latest Version. So That All we Need to do is Just Revert v1.3.3 of ‘HTML/CSS Support’ extension until sorted This Issue.
This Solution Is Also Worked For Me. You can Revert version for this plugin.
Solution 3
If Your “HTML CSS Support” Plugin auto updated Then just Follow below Step.
- Open setting.json file.
- Just add css.validation as defined below.
- Reload VS Code after changing the settings though.
css.validation
"css.validation":{
"id":false,
"class":false
}
Summery
So it’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. And Also Comment on your suggestion here.