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

Duplicate imports are resolved in the wrong order #211

Closed
simonsmith opened this issue May 18, 2016 · 4 comments
Closed

Duplicate imports are resolved in the wrong order #211

simonsmith opened this issue May 18, 2016 · 4 comments

Comments

@simonsmith
Copy link
Contributor

Not sure if this title is accurate, feel free to rename.

Given two files:

componentA.css

@import "suitcss-components-button";

.ComponentA {
  color: red;
}

index.css

@import "./componentA.css";
@import "suitcss-components-button";

I would expect that even though components-button is at the bottom in index it would see that componentA requires it as a dependency and would place the Button CSS above the ComponentA CSS in the final output. This does not happen:

**output

.ComponentA {
  color: red;
}
/** @define Button */
// etc

If I install postcss-import@7.1.3 and run the test again the output is as expected, with components-button first and the component code after it.

Is this a regression perhaps?

Cheers

@MoOx
Copy link
Contributor

MoOx commented May 18, 2016

Yeah it' s totally a regression. postcss-import v8 have a totally different algo implemented by @TrySound.
You are not the first to have some weird behavior. See #168.

See #169 (comment)

@simonsmith
Copy link
Contributor Author

I see. Sounds like resurrecting v7 might be a good idea.

@0x80
Copy link

0x80 commented Nov 1, 2016

I ran into similar issues, with errors about undefined mixins. Reverting to v7 solved things.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 3, 2016

Should be fixed in #236. Let me know if otherwise.

@RyanZim RyanZim closed this as completed Nov 3, 2016
simonsmith added a commit to suitcss/preprocessor that referenced this issue Nov 12, 2016
This is the result of a bug being fixed in postcss-import@8.1.3

postcss/postcss-import#211
giuseppeg pushed a commit to suitcss/preprocessor that referenced this issue Nov 12, 2016
This is the result of a bug being fixed in postcss-import@8.1.3

postcss/postcss-import#211
mlnmln pushed a commit to mlnmln/suit that referenced this issue Dec 30, 2018
This is the result of a bug being fixed in postcss-import@8.1.3

postcss/postcss-import#211
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

4 participants