windicss with vuejs in vscode throwing `} expectedcss(css-rcurlyexpected)`

486 Views Asked by At

In my vuejs component I have style like this

<style>
.preview-page {
  .preview-section {
    width: 100%;
  }
  .logo-section {
    text-align: center;
  }
}
</style>

Its building fine and showing correct results in browser, but on vscode its showing 2 errors Do not use empty rulesetscss(emptyRules) and } expectedcss(css-rcurlyexpected)

enter image description here

1

There are 1 best solutions below

0
Frish On

OK, looks like there are two issues being picked up on:

  1. Do not use empty rulesetscss(emptyRules) is a valid complaint, since .preview-page{} contains no styles (although its children do). Add some styles to .preview-page or suppress the warning if it bothers you.
  2. } expectedcss(css-rcurlyexpected) I assume is triggering because you have not defined lang="scss" in your <style> tag. Here is the documentation.