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 custom properties are prepended with path #680

Open
mauskin opened this issue Sep 22, 2020 · 1 comment
Open

CSS custom properties are prepended with path #680

mauskin opened this issue Sep 22, 2020 · 1 comment

Comments

@mauskin
Copy link

mauskin commented Sep 22, 2020

When url uses custom property it is prepended with a path so that this

background-image: url(var(--nice-view));

turns to

background-image: url(/path/to/css/var(--nice-view));

Is there a way to avoid this?

@mauskin
Copy link
Author

mauskin commented Sep 22, 2020

Of course there’s a way. Just include url in your custom property so that instead of this

background-image: url(var(--nice-view));

you would write this

background-image: var(--nice-view);

And the property has to be defined like this: --nice-view: url(path/to/img.jpg);.

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

1 participant