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

css variables doesn't get interpolated #98

Open
PlopTheReal opened this issue Apr 9, 2021 · 1 comment
Open

css variables doesn't get interpolated #98

PlopTheReal opened this issue Apr 9, 2021 · 1 comment

Comments

@PlopTheReal
Copy link

For the given json:

{
    "backgroundColor": "#3215B3",
}

the following doesn't work ($backgroundColor doesn't get replaced):

:root {
  --backgroundColor: $backgroundColor;  
}

but this one works:

html {
  color: #3215B3; 
}

I'm using the CLI.

@cr0ybot
Copy link

cr0ybot commented Jan 26, 2022

This is a Sass language feature, not an issue with this module. You need to manually interpolate when setting CSS custom property values like this:

:root {
  --backgroundColor: #{$backgroundColor};
}

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