user image

Great Coder
Published in : 2022-02-13

Invalid CSS after : expected expression was - SASS error

HTML & CSS

Hello, I'd like to ask you a question concerning SCSS. When I use @use, I receive the following error:

Invalid CSS after "…": expected expression was "…"

How can I fix it, please?

Comments

Mohamed Aboelfotoh Date : 2022-02-13

Best answers

4

Best answers

4

I experienced the exact same issue. You read about @use on the SASS official web page, follow the instructions, and create the code in the VS code, but when you save the SCSS or SASS file, you receive this weird Compilation Error. You check it all and everything appears to be in order, but it isn't.

In fact te issue stems from the Visual Studio Code extension you're using to convert SCSS or SASS files to CSS files.

Probably you are you using the widly used SASS compiling extension developed by Ritwick Dey. All you need is to replace it with the Live SASS Compiler extension developed by Glenn Marks.
 

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

Multiple classes in :not() function in CSS
Publish date: 2022-07-25 | Comments: 2

Tag: HTML & CSS

Searching for a better way to use abstracts in Dart SASS
Publish date: 2022-02-10 | Comments: 0

Tag: HTML & CSS

Do I have to upload the sass files or just the CSS file?
Publish date: 2022-02-11 | Comments: 1

Tag: HTML & CSS

How to horizontally align to the centre a li inside an ul?
Publish date: 2022-03-04 | Comments: 2

Tag: HTML & CSS

Is OOCSS still a good CSS architecture in 2022?
Publish date: 2022-02-08 | Comments: 2

Tag: HTML & CSS

min-height is not working on td or th
Publish date: 2021-10-20 | Comments: 1

Tag: HTML & CSS

Can't move the background-image code from CSS file to HTML file.
Publish date: 2022-02-13 | Comments: 2

Tag: HTML & CSS

How can I add engraved style to my buttons using CSS?
Publish date: 2022-03-01 | Comments: 5

Tag: HTML & CSS