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

How to import sass-mq in a project when installed from npm #89

Closed
certainlyakey opened this issue Jun 23, 2016 · 5 comments
Closed

How to import sass-mq in a project when installed from npm #89

certainlyakey opened this issue Jun 23, 2016 · 5 comments
Labels

Comments

@certainlyakey
Copy link

certainlyakey commented Jun 23, 2016

Hi! I installed sass-mq with npm using npm install sass-mq --save and tried all the combinations then to import it in a SASS file. These are:

  • @import '_mq';
  • @import 'mq';
  • @import '_sass-mq';
  • @import 'sass-mq';
  • @import '_mq()';
  • @import 'mq()';
  • @import 'sass-mq/mq';.

Only the "full" path version @import './node_modules/sass-mq/_mq'; has worked. Still, is there a standard alias that we can use?

@kaelig
Copy link
Member

kaelig commented Jun 23, 2016

Hi @certainlyakey, thank you for using Sass MQ!

Have you tried using Eyeglass to load Sass MQ?

Then your import should look like this:

@import 'sass-mq';

@certainlyakey
Copy link
Author

Hi! Thanks for the answer. I thought it was optional to use eyeglass? So that's the only way to import it that "simple" way, right?

@kaelig
Copy link
Member

kaelig commented Jun 24, 2016

You are correct, it is optional to use Eyeglass.

As an alternative, you may want to look into includePath in node-sass. Hope this helps!

@certainlyakey
Copy link
Author

OK, thanks!

@benrich
Copy link

benrich commented Sep 4, 2022

Don't ask me why but '~sass-mq' worked for me.

Although 6 years later @use is recommended now

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

3 participants