Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sass is having hard time parsing a CSS RGB syntax

Tags:

css

sass

Just plugged in gulp-sass into an existing project, and I'm getting an error when I try to write an RGB syntax as follows:

rgb(70 168 255 / 0.05)

The log:

[17:51:58] Starting 'compileCSS'...
Error in plugin "sass"
Message:
    src/xxx.css
Error: Function rgb is missing argument $green.
        on line 77 of src/xxx.css
>>     background-color: rgb(70 168 255 / 0.05);

This is a valid CSS sytnax (which my chrome apparently decided it should be my default syntax). Am I forced to replace all of the occurrences with commas?

like image 805
Eliya Cohen Avatar asked Sep 03 '25 07:09

Eliya Cohen


2 Answers

Use sass instead of node-sass.

% npm uninstall node-sass
% npm install sass
like image 131
jqgsninimo Avatar answered Sep 04 '25 23:09

jqgsninimo


Update:

dart-sass has been deprecated in favor of sass


According to sass, node-sass doesn't support color level 4. Therefore, I used the dart-sass compiler instead.

like image 32
Eliya Cohen Avatar answered Sep 04 '25 22:09

Eliya Cohen