VS code CSS class selector not found with angular and bootstrap 5 beta

前端 未结 11 2039
陌清茗
陌清茗 2021-02-05 02:31

I\'m using bootstrap 5 with angular and I add style and script to angular.json but the problem in VS Code it does not recognize the bootstrap classes.

11条回答
  •  萌比男神i
    2021-02-05 03:33

    Check if extension "HTML CSS Support" got auto-updated. If it did, then it will ask for reloading of VS Code. Do it. Had exactly same issue today.

    Update

    That did not help.

    Looks like the issue should have been solved with the next release of the extension, but still, some of the Problems are there. Check the github: https://github.com/ecmel/vscode-html-css/issues

    In short, what you need to do is go to VS Code settings and switch from "User" to "Workspace". Then type "css settings" in settings search bar and open the exact same option under "Extensions". Click "CSS: Style Sheets", which will open settings.json for workspace and add your CSS files paths there. Hopefully it will solve all the Problems for you.

提交回复
热议问题