Home > Enterprise >  Compilation Error SCSS: "Invalid CSS after..."
Compilation Error SCSS: "Invalid CSS after..."

Time:09-22

I have been trying to use SASS for a project, but when I try to use the "math" module to do a division, the vscode console throws me the error that I leave in the capture. As a compiler I use the Live Sass Compiler plugin. I do not know if I am clear enough, I hope you can help me.

code and console error

Greetings!

CodePudding user response:

I had the same issue. Now we get an warn if try to do a division $var / 2 for exemple.

To fix, first import 'math'

@use 'sass:math';

Then change all division (with /) to math.div($var, 2). Where the first element will be divide by the second.

CodePudding user response:

I've managed to replicate the error and fixed it by doing

border-radius: $base-border-radius / 4

  • Related