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

Issues with CSS variables #7

Open
davshoward opened this issue Aug 13, 2018 · 4 comments
Open

Issues with CSS variables #7

davshoward opened this issue Aug 13, 2018 · 4 comments

Comments

@davshoward
Copy link

Hi there,

Great plugin, but it doesn't seem to work with CSS variables.

// Works
background: linear-gradient(to right, green, ease, red);

// Fails
:root {
--red: red;
--green: green;
}

background: linear-gradient(to right, var(--green), ease, var(--red));

@CloudPower97
Copy link

Hello @larsenwork ,
I'm experiencing the same problem described by @davshoward.
Are there any updates on this issue?

Moreover I would like to point out that I have the same exact problem when using postcss-modules-values.

Instead postcss-modules-values-replace seems to fix this problem.

I'm not sure if this helps you, but you might find this information useful.

Thanks for your time in advance

@larsenwork
Copy link
Owner

I could add support for css-variables — it would be a bit clunky syntax using color-mod with blend but it should work... I'll give it a go soon :)

@krry
Copy link

krry commented Feb 21, 2019

I too would love to be able to pass var(--color-name) to the gradients.

On a similar note, I thought it would be especially dope to be able to pass dynamically sensed colors (like these) to easing-gradients to make super smooth gradients based on the page's imagery. That works, and it looks great!

@bdrtsky
Copy link

bdrtsky commented Jan 18, 2020

Confirm, this doesn't work with variables. Frustrating :(

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

No branches or pull requests

5 participants