Sass Invalid CSS Error

Sass Invalid CSS Error: expected expression

Based on your error message (error sass/test.sass) I can tell you're using the .sass extension for a Scss file. Change your file name to style.scss.

Sass and Scss use two different and incompatible syntaxes.

node-sass invalid CSS

The syntax is incorrect for node-sass.

You have defined the font variable correctly in fonts.scss but you need to import the font file into your Nav.scss file if you haven't already with:

@import "PATH/fonts.scss";

You then just need to reference the variable like so:

font-family: $roboto;

Sass invalid css error on compile in live sass compiler

It looks like you're using the .sass file extension for index.sass for a scss file. You need to change it to use the scss file extension for it to compile.

See also:

Sass Invalid CSS Error: "expected expression"

Error: Invalid CSS, while converting SASS to CSS

Dart-based npm package dart-sass worked. Ruby-based Sass does not support @use usage.

SASS 'Invalid css error' when using variable from imported module

The @use is not currently supported in node-sass (as of v4.14.1) and is only available in dart-sass



Related Topics



Leave a reply



Submit