Google Closure Stylesheets parse error with @media only screen

491 views Asked by At

I'm using closure-stylesheets-20111230.jar to combine and minify all my CSS. However it's throwing parsing error with @media only screen and (min-device-width : 320px) on something that looks fine to me.

Google closure-stylesheets.jar to parse css:

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

CSS code:

@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; }   
} 

Any thoughts? I have just use their closure-stylesheets.jar file but was wondering if anyone had a proper solution. Thanks!

1

There are 1 answers

0
MichielB On

I know this question is really very old. The question does not include any parsing error message. On 'new' closure-stylesheets I can't compile your stylesheet because of the space between min-device-width and the colon; I also get an error message pointing this out.

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

If I remove the space, the stylesheet compiles without issues.