Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新版 (>=0.0.9) Window 中, 路径分隔符替换问题 #11

Closed
17 opened this issue Jun 26, 2014 · 2 comments
Closed

新版 (>=0.0.9) Window 中, 路径分隔符替换问题 #11

17 opened this issue Jun 26, 2014 · 2 comments

Comments

@17
Copy link
Contributor

17 commented Jun 26, 2014

在 Window 中 路径会被替换成 ..\img\main.png 并不是 ../img/main.png.
这样会导致浏览器 URL 识别错误.

@17 17 changed the title 新版 (>=0.0.9) Window 中路径分隔符替换问题 新版 (>=0.0.9) Window 中, 路径分隔符替换问题 Jun 26, 2014
@xuexb
Copy link

xuexb commented Jun 27, 2014

+1, 且如果图片的路径后面有 ? 那么这个图片将不会被匹配, 如:

.mod-form .item-4:hover .icons{background-image:url('../../images/home/index/job-sprite/1-4.png?x');}
.mod-form .item-5:hover .icons{background-image:url('../../images/home/index/job-sprite/1-5.png?x');}
.mod-form .item-6:hover .icons{background-image:url('../../images/home/index/job-sprite/1-6.png');}

=>

.mod-form .item-4:hover .icons{background-image:url('../../images/home/index/job-sprite/1-4.png?x');}
.mod-form .item-5:hover .icons{background-image:url('../../images/home/index/job-sprite/1-5.png?x');}
.mod-form .item-6:hover .icons{background-image:url('..\..\images\home\index\index.png?20140627150655');background-position:-72px -72px;}

@laoshu133
Copy link
Owner

5045650

路径问题已经修正,
由于 grunt-css-sprite 自身会带有自动加入时间戳功能,内部采用路径替换,当原路径中带有 ? 不会进入匹配;建议不要在图标路径中带有 ?

PS. 为这次更新测试不完善带来的使用不愉快,表示歉意 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants