Santosh shah
Santosh shah

Reputation: 235

what is the difference between sass watch and compass watch

For sass currently I am using

sass --watch path1:path2

to compile scss file to css but i even found

compass watch path1:path2

also. Is there any difference between these two watches? I created a project with compass create project and found that there are two main folders called sass and stylesheets I looked to screen.scss file and I found the code @import "compass/reset";, but there isn't any directory called compass to call the reset.

I am really new to sass and compass. Can anyone explain me how to use compass? Any help will be greatly appreciated. Thanks in advance.

Upvotes: 13

Views: 4782

Answers (1)

rdougan
rdougan

Reputation: 7225

To understand the difference, you must first understand the difference between Sass and Compass.

  • Sass is a language which is an extension of CSS. It has built in math functions and adds the ability to add more functions and mixins - but it doesn't include any.
  • Compass is a framework for Sass. It adds additional functionality on top of Sass such as CSS3 mixins, layout helpers and other utilities. It also gives you the ability to add additional 3rd party frameworks into your project (called extensions).

So with that, the difference between the two are:

  • sass --watch will compile Sass files, but because it doesn't know anything about compass, it will just ignore it.
  • compass watch is just like the Sass command, only it knows about the additional Compass functionality. So when you import compass/reset - it knows what to import.

You can find a reference to all Compass' functionality here: http://compass-style.org/reference/compass/

At the top of each page it will show you which part of Compass to import. For example, here is the page about reset: http://compass-style.org/reference/compass/reset/

Upvotes: 19

Related Questions