Prevent SASS/Compass From Outputting Partials

青春壹個敷衍的年華 提交于 2019-12-20 05:45:38

问题


I am successfully using Compass to generate a CSS file but it is also outputting my partials to the CSS directory. How can I make it only output the stylesheets that will be used in the page? There's no need to add the partials to the destination css directory.


回答1:


From the manual:

If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.

http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials



来源:https://stackoverflow.com/questions/24347126/prevent-sass-compass-from-outputting-partials

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!