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?
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.