Import CSS files with SASS

Asked

Viewed 257 times

1

I’m starting in SASS and I’m trying to make a CSS file that will be a combination of several plug-ins that are in format . css (bootstrap, fontawesome, etc.) and for that I’m using SASS, but it’s not working in this case, it’s returning me to the same thing, with the Imports and everything else only in the css syntax instead of returning me a minified version of all the plugins.. you know I tell you why?

Follow me file that will generate the . css (use . Sass format):

/*===PLUGINS */
@import '../assets/global/plugins/font-awesome/css/font-awesome.min.css'
@import '../assets/global/plugins/simple-line-icons/simple-line-icons.min.css'
@import '../assets/global/plugins/bootstrap/css/bootstrap.min.css'

/*===FONTES */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700) 

And this is the command line that’s compiling:

sass --watch --no-cache --sourcemap=none sass\globalMandatories.sass:assets\global\css\globalMandatories.min.css --style compressed

1 answer

2


Because the . css files do not have the syntax of a . Sass/. scss file, the best alternative to do what you want, is to use a task Runner as GULP (I recommend) or GRUNT

GULP SASS CONCAT/MINIFY

  • 1

    Great! Thank you @Vinicius

Browser other questions tagged

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