Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use css variables within rgb() and rgba() #2878

Closed
finnhvman opened this issue Apr 14, 2019 · 2 comments
Closed

Can't use css variables within rgb() and rgba() #2878

finnhvman opened this issue Apr 14, 2019 · 2 comments

Comments

@finnhvman
Copy link

node-sass throws an error on valid CSS when using var() in rgb() or rgba(), most probably an issue in libsass

Issue in node-sass

input.scss

.test {
  --my-var: 255, 0, 0;
  color: rgb(var(--my-var));
}

Actual results

node-sass 4.11.0 libsass 3.5.4

{ Error: Function rgb is missing argument $green.
    at options.error (/Users/bszabo/WS/sass-test/node_modules/node-sass/lib/index.js:291:26)
  status: 1,
  file: '/Users/bszabo/WS/sass-test/test.scss',
  line: 3,
  column: 10,
  message: 'Function rgb is missing argument $green.',
  formatted: 'Error: Function rgb is missing argument $green.
        on line 3 of test.scss
>>   color: rgb(var(--my-var));
   ---------^
' }

Expected result

dart-sass 1.17.4

.test {
  --my-var: 255, 0, 0;
  color: rgb(var(--my-var));
}

version info:

$ node-sass --version
node-sass       4.11.0  (Wrapper)       [JavaScript]
libsass         3.5.4   (Sass Compiler) [C/C++]
@nschonni
Copy link
Collaborator

Duplicate of #2561

@nschonni nschonni marked this as a duplicate of #2561 Apr 14, 2019
@finnhvman
Copy link
Author

My bad about the duplicate.

Which libsass release fixes this?

Because it's seemingly still an issue in libsass 3.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants