Skip to content

grouped code generation in the end of file maybe has a problem #3

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
bravelincy opened this issue Mar 1, 2018 · 1 comment
Closed

Comments

@bravelincy
Copy link

I using stylus in my project, so that media-query can be nested, the scenario is:

bg2x(src) {
  @media screen and (min-resolution: 2dppx) {
    background-image: url(src);
  }
}

.foo {
  ...
  bg2x("img/foo@2x.png");
}

@media screen and (max-width: 768px) {
  .foo {
    bg2x("img/foo_small@2x.png");
  }
}

finally compiled:

@media screen and (max-width: 768px) and (min-resolution: 2dppx) {
 foo {
    bg2x("img/foo_small@2x.png");
  }
}

@media screen and (min-resolution: 2dppx) {
  ...

  .foo {
    ...
    bg2x("img/foo@2x.png");
  }
}

the result is .foo doesn't use foo_small@2x.png but img/foo@2x.png

@retyui
Copy link
Owner

retyui commented May 1, 2018

@joenil Hi!
Can you create a test repository with a this problem?

@retyui retyui closed this as completed May 10, 2018
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