Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between sass watch and compass watch

Tags:

sass

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.

like image 793
Santosh shah Avatar asked Dec 13 '12 09:12

Santosh shah


People also ask

What is SASS and compass?

Compass. SASS. Definition. Compass is an SASS library holding the raw code with additional inbuilt functions. SASS is merely and extension of CSS3 which includes variables, loops, selector inheritance and many more.

What is compass compiler?

Compass is an open-source CSS authoring framework which uses the Sass stylesheet language to make writing stylesheets powerful and easy.


1 Answers

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/

like image 150
rdougan Avatar answered Oct 16 '22 22:10

rdougan