开发者

sass @import "compass/reset" error

开发者 https://www.devze.com 2023-03-10 10:31 出处:网络
I\'d like to use Sass with Compass on my static HTML project, but following the instructions does not work. This is what I did:

I'd like to use Sass with Compass on my static HTML project, but following the instructions does not work. This is what I did:

$ gem install compass
$ cd <myproject>
$ compass开发者_JS百科 install compass .

which was following by awaiting:

directory ./sass/
directory ./stylesheets/
   create ./sass/screen.scss 
   create ./sass/print.scss 
   create ./sass/ie.scss 
   create ./stylesheets/screen.css 
   create ./stylesheets/ie.css 
   create ./stylesheets/print.css 

But when I start watching scss sass --watch sass:stylesheets, I get an error:

error sass/screen.scss (Line 6: File to import not found or unreadable: compass/reset.

This msg coherent with @import "compass/reset";

What do I have to do on my Ubuntu to see that compass imports?


Use compass watch instead of sass --watch sass:stylesheets. If you're using compass, you don't need to bother with sass command. Just use the compass command.


if you really wanted to use sass command i use this code. Considering that you are in your sass directory running the following command.

sass --watch style.scss:../stylesheets/

That simply means that I have created a new file called style.scss and imported the following files within my style.scss. So sass would only watch a single file. In the above command we wishes to have the generated style.css to be in the stylesheet directory.

again its sass --watch style.scss:/path-to-output-directory/

@import "ie";
@import "print";
@import "screen";

so in this process sass is only watching single file style.scss for any changes within sass directory files.

I hope this explains well.

0

精彩评论

暂无评论...
验证码 换一张
取 消