How does css inspections recognize styles in subcomponents in webstorm

Business background

  • develop vue project
  • in webstorm
  • refers to third-party ui components, such as mint-ui
  • often modifies the default css style in mint-ui

.

  • css sample code is as follows:
<style scoped>
 /deep/ .mint-cell-wrapper {
      padding: 20px;
      ...

problems encountered

  • so the modification is full Ok
  • however, webstorm checks css rules by default
  • when you find that a css class selector you defined does not appear in the html of the current page
  • will issue a warning

.

  • warning is as follows

clipboard.png

my solution

  • ignore him, because it is a warning, no matter it is OK, but sometimes I feel a little awkward when I see this kind of wavy line
  • you can also turn off this check rule directly in the style check, but this is not very elegant

expected results

  • the cause of his problem
  • must be because webstorm cannot recognize styles in subcomponents
  • how can I set up to recognize the styles in the subcomponents?
Aug.18,2021
Menu