9

So I have file styles_manager.scss where I have a lot of sytles references and I want doo something like this inside this file:

@import (inline) "node_module/animate.css/animate.min.css"; 
@import "../common/bootstrap/config";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
@import "../common/variables";
....

I will parse it by scss and get output.css . So I want to have animate.min.css body inside output .css.

In less this sis trivial - "(inline)" statement. How to import css file body into SCSS?

Kamil Kiełczewski
  • 85,173
  • 29
  • 368
  • 345
  • 1
    http://stackoverflow.com/questions/7111610/import-regular-css-file-in-scss-file – Lowkase Jun 28 '16 at 19:35
  • @Lowkase If you give short, clear answer using above example (without theoretical and historical background of this problem) I will choose your answer. – Kamil Kiełczewski Jun 28 '16 at 20:38
  • 1
    The link is not theoretical, the answer to your question is in the link. I am all for gaining more upvotes but it is not necessary when the answer to your question already exists. – Lowkase Jun 29 '16 at 01:58

1 Answers1

15

The answer is: remove '.css' extension in @input statement (this works for sass version >= 3.2). So example above should look like this:

@import "node_module/animate.css/animate.min"; 
@import "../common/bootstrap/config";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
@import "../common/variables";
....

More theoretical and historical background of that topic you can find here (what was mention by @Lowkase in comments below question)

Community
  • 1
  • 1
Kamil Kiełczewski
  • 85,173
  • 29
  • 368
  • 345