cssdream / cssgrace

从今天起,写简单优雅面向未来的 CSS。From now on,writing brief,elegant,future-oriented CSS.
MIT License
592 stars 63 forks source link

grunt 运行出错 #9

Closed maozhenhua2 closed 9 years ago

maozhenhua2 commented 9 years ago

D:/work/demo_test/js/foundation/foundation/下

--Gruntfile.js --app1/ ----css/ ------content.css ----img/ ------background.jpg

content.css里 .pic2 { background: url('../img/background.jpg?1421738406') no-repeat top left; }

Gruntfile.js里 postcss: { options: { processors: [ require('postcss-custom-selector')(), require('cssgrace'), ] }, dist: { src: 'app1/css/*.css' } }

运行grunt potcss会出错 Warning: ENOENT, no such file or directory 'D:\work\demo_test\js\foundation\img\pic2.jpg?1421738406' Use --force to continue.

实际的图片路径是D:\work\demo_test\js\foundation\foundation\app1\img\pic2.jpg?1421738406 请问是我Gruntfile.js里路径设置有问题还是其他什么原因

yisibl commented 9 years ago

图片路径不对,所以无法获取尺寸。

请升级到 V2.0 版本,尝试修改路径,url 中的图片路径是 CSS 文件相对图片的路径。

Volker-E commented 9 years ago

Still running into this issue with v2.0, in my case with a background-image property and an absolute path like background-image: url(/x-img/image.png)

ericorruption commented 9 years ago

Same issue here.

machwatt commented 9 years ago

Needs fix asap, as this prevents from using cssgrace in gruntfiles for a certain amount of setups.... refer to #33