简体   繁体   English

Codekit + Less / CSS缩小

[英]Codekit + Less / CSS minification

So I would like to get Codekit to minify all my css + less files Upon save. 所以我想让Codekit在保存时最小化我所有的CSS +更少的文件。

In the header of my 'style.less' I am trying to import the 'css' file as a less context like: 在我的'style.less'的标头中,我试图将'css'文件作为较少的上下文导入,例如:

@import (less) "normalize.css"; 
@import (less) "file1.css"; 
@import (less) "file2.css"; 
@import (less) "file3.css"; 

body {.... 

In the hope it will sort of be 'included' then minified on save. 希望它会被“包含”,然后在保存时最小化。 I cant seem to get it to work with any combination of @import, saving the css files as less files. 我似乎无法使其与@import的任何组合一起使用,将CSS文件保存为更少的文件。

Can it be done? 能做到吗

So my issue was trying to @import font replacement. 所以我的问题是试图@import字体替换。 When looking inside the font replacement file there was an import happening over another site. 在字体替换文件中查看时,在另一个站点上发生导入。 I believe this is what was causing the miniification to fail... 我相信这是导致最小化失败的原因...

Hope this helps someone else. 希望这对其他人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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