Rails资产预编译:jquery.scrollbar.css背景图像中的CSS无效

时间:2015-02-20 18:28:20

标签: jquery css3 ruby-on-rails-4

在部署我的Rails应用程序的资产预编译阶段,我收到以下错误:

Sass::SyntaxError: Invalid CSS after "...round: url(data": expected comma, was ":image/svg+xml;..."
(in  /.../workshop/app/assets/stylesheets/application.css)
(sass):13673

有罪的CSS是第二个背景定义,其中包含背景图像的URL。我该如何解决这个问题?

.scrollbar-light > .scroll-element .scroll-element_size {
background: #dbdbdb;
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi
8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2
VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaW
VudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2
Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiZGJkYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMC
UiIHN0b3AtY29sb3I9IiNlOGU4ZTgiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD
0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdm
c+);
background: -moz-linear-gradient(left, #dbdbdb 0%, #e8e8e8 100%);

1 个答案:

答案 0 :(得分:4)

url需要引用...

background: url('data:image/......');