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

@import CSS injector reordering my stuffs #452

Closed
9mm opened this issue Aug 16, 2014 · 5 comments
Closed

@import CSS injector reordering my stuffs #452

9mm opened this issue Aug 16, 2014 · 5 comments
Labels

Comments

@9mm
Copy link

9mm commented Aug 16, 2014

I'm trying to add normalize.css which must go first before any other CSS in the app (and I dont just want to paste it right into app.scss because it's huge and messy).

According to the demo file: https://github.com/DaftMonk/fullstack-demo/blob/master/client/app/app.scss

I can see other files are going before main/main.scss. When I try to do this, the moment I refresh the page it's instantly re-ordered so main is first.

If I try putting @import outside of the injector comment, as in the demo, it immediately moves it back into the injector and makes a duplicate.

Thanks

@kingcody
Copy link
Member

How are you trying to add normalize.css? If you run bower install --save normalize-css it should be injected above app.(s)css

@9mm
Copy link
Author

9mm commented Aug 16, 2014

You're right... I totally didnt even think of doing that. Thank you so much.

@9mm 9mm closed this as completed Aug 16, 2014
@kingcody
Copy link
Member

@9mm no problem, glad I could help.

@JaKXz JaKXz added the question label Aug 17, 2014
@meezyart
Copy link

How do you prevent the rendering .. I have a variable css I'm importing and its getting reordered.
this
// Component styles are injected through grunt
// injector
/* === Global === */
@import 'shell/_fonts';
@import 'shell/_varibles';
@import 'normalize/_normalize';
@import 'shell/_global';

/* === views === /
@import 'product/resource';
@import 'sharing-form/sharing-form';
//
=== header footer === */
@import 'header/header';
@import 'footer/footer';

/* === reusable components === */
@import 'ja-model/_model';
@import 'animation-css/_animation';
// endinjector

gets reorder to this

// Component styles are injected through grunt
// injector
@import 'footer/footer.scss';
@import 'header/header.scss';
@import 'product/resource.scss';
@import 'sharing-form/sharing-form.scss';
@import 'shell/_fonts.scss';
@import 'shell/_global.scss';
@import 'shell/_varibles.scss';
@import 'animations-css/_animation.scss';
@import 'ja-model/_model.scss';
@import 'modal/modal.scss';
@import 'normalize/_normalize.scss';
@import 'spinner/_spinner.scss';
// endinjector

any idea why ? or what is the best way to import these

@Awk34
Copy link
Member

Awk34 commented Nov 16, 2015

@meezyart see how grunt-injector works

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

No branches or pull requests

5 participants