How to import external CSS

Asked

Viewed 387 times

1

Hello, I am using Compass and would like to know how I can import an external file from my configured folder to Sass.

Currently the scss is like this:

@import "../../node_modules/angular-material/angular-material.min.css";
@import "compass/css3";
@import "compass/reset";

$azul : #214d8f;

body {
  background-color: $azul;
}

The way out he gives me is this:

@import url(../../node_modules/angular-material/angular-material.min.css); ...

What I need to do is that this angular-material.min.css is actually included in my final css, not just referenced. I tested the @embed, but it didn’t work either.

1 answer

1

In Stackoverflow (in English) I had asked this same question, reported that there was already another similar post with the solution.

https://github.com/chriseppstein/sass-css-importer

I tested it here and it worked right, just didn’t get very cool (I don’t know why) with the angular-material.min.js. When I tested the non-minified version it worked right.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.