简体   繁体   中英

(SASS) How do I exclude my imported files to compile to css files

I have the following sass directory

sass

config.rb
-base.scss
-mixins.scss
-main.scss 

site
  -dowmloads.scss
  -messages.scss
  ...
  ...

This works fine, however I don't want all my .scss files to compile to css files.I just want to output main.css because it imports the other files. Whenever I do compass watch all the css get created... Is this possible?


Start the filename with an underscore. You can then import this and it's styles will only get added to the file that imports it. The actual file itself will never get generated into it's own css file.

Hope it helps.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM