-1

VS code does not recognize variables ($). at-rule or selector expected { expected

I tried restart, shut down, uninstall VS Code, copy to new file ...

$color1: aqua; $color2: #333; $color3: rgba(136, 0, 0, 0.75); $color4: rgba(255, 153, 51, 0.75);

1 Answers1

0

Make sure that you have installed the sass-live-compiler and you've clicked 'watch sass' at the bottom/panel.

  • Also check if you've imported the compiled css file into your component.

e.g import './style.css' not import './style.scss'.

I hope this helps mate.

  • Thank you :) 'Watch sass' is turned on because it creates new css and css.map, the correct file is also imported. I even noticed that it executes the code, but throws an error and is hard to follow and write – marta_ pok Jul 27 '23 at 06:11