Google Closure Stylesheets在仅@media屏幕上解析错误

时间:2013-12-03 10:47:52

标签: css google-closure-stylesheet

我正在使用closure-stylesheets-20111230.jar来组合和缩小我的所有CSS。然而,对于 @media only screen和(min-device-width:320px),它会对我看起来不错的东西抛出解析错误。

Google closure-stylesheets.jar解析css:

  

java -jar closure-stylesheets.jar .. \ data \ css \ mycss.css --output-file   .. \数据\ CSS \ myresult.css

CSS代码:

@media only screen 
and (min-device-width : 320px)
and (max-device-width : 480px) {
.switchMobile{ padding: 33px 0 0 0; height: 90px; }
.switchMobile a { font-size: 300%; }   
#closeMobileLink{ margin: -60px 20px; }   
} 

有什么想法?我刚刚使用了他们的closure-stylesheets.jar文件,但想知道是否有人有一个合适的解决方案。谢谢!

1 个答案:

答案 0 :(得分:0)

我知道这个问题确实很老了。该问题不包括任何分析错误消息。由于min-device-width和冒号之间的空格,在'new'封闭样式表上,我无法编译您的样式表。我也收到一条错误消息指出这一点。

Compiler parsing error: Parse error in stylesheet.gss at line 2 column 22:
and (min-device-width : 320px)

如果我删除空格,则样式表编译不会出现问题。