18

I am using gulp as a task runner which merge and minifying scss files for me. In this case if I try to import a regular CSS file, it will compile to a css import statement as below:

/* style.scss */
@import "../../bower_components/animate.css/animate.css";

/* style.css */
@import url(../../bower_components/animate.css/animate.css);

So how to import that regular css file, to have a compiled version of that in the style.css instead of just css @import statement?

1 Answer 1

53

Simply do this:

/* style.scss */
@import "../../bower_components/animate.css/animate";

Just don't write file extension, Import the file without the extension, the compiler will put the file content in style.css instead of putting @import rule.

Sign up to request clarification or add additional context in comments.

2 Comments

Works like charm.
I also had to rename my file from .min.css to .css to make it work .. idk why

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.