Skip to content

URL handling in @keyframes blocks #164

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

Closed
madx opened this issue Oct 15, 2015 · 4 comments
Closed

URL handling in @keyframes blocks #164

madx opened this issue Oct 15, 2015 · 4 comments

Comments

@madx
Copy link

madx commented Oct 15, 2015

When using the following CSS, I do have an error Module not found: Error: Cannot resolve module for the url() part in the @keyframes block:

.className {
  background-image: url("./image.png")
}

@keyframes anim {
  0% {
    background-image: url("./image.png")
  }
}

I added a simple test to test/urlTest.js to expose the behaviour:

test("keyframe background img", "@keyframes anim { background: green url('img.png') xyz }", [
  [1, "@keyframes anim { background: green url({./img.png}) xyz }", ""]
]);
@sokra
Copy link
Member

sokra commented Oct 18, 2015

I don't understand the problem here?

@madx
Copy link
Author

madx commented Oct 19, 2015

Excuse me if the issue was not clear enough :)

The problem is that the url() call in the @keyframes block is not translated to url({./img.png}) but to url({img.png}) which does not resolve correctly.

@sokra
Copy link
Member

sokra commented Oct 19, 2015

ah ok...

sokra added a commit that referenced this issue Oct 19, 2015
added test case for #164
@madx
Copy link
Author

madx commented Oct 20, 2015

Thank's a lot, it's working great! 👍

jquense pushed a commit to jquense/css-modules that referenced this issue May 7, 2019
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

2 participants