1
votes

I had a doubt regarding compiling the scss file using compass. For example I have 2 directories, 1 for Sass and another 1 for my CSS files. In my css directory, I have 2 CSS files... "xuvs.css" and "site.css"....

If I make changes in the "xuvs.scss" file, so during the final compilation, by default Compass applies the changes to "xuvs.css"... So is it possible to apply those changes in the "site.css" instead of "xuvs.css" file using compass?

1
If you changed xuvs.scss why would site.css change?cimmanon
I am a bit new to this and hence wanted to know, if it is possible to do that or not.Anand Arur
You must have a reason why you believe site.css should change when xuvs.scss is modified.cimmanon

1 Answers

3
votes

By default, Sass and Compass will output .css files for any matching .scss files that are not prefixed with an underscore. This is why your "css" directory contains the two compiled files: one for each of your .scss files.

It is possible to modify xuvs.scss and have it compile into site.css: you would do this via the @import rule, however, unless you changed the file name of xuvs.scss to _xuvs.scss, you would still have a separate, compiled file named xuvs.css. Files that are prefixed with an underscore are called partials.

It is considered a "best practice" to create partials and @import them into a single, compiled "base" .scss file. In your case, this compiled file would be called site.css.