Sunday, March 26, 2017

Re: GWT gwt obfuscation (gwt-style=OBF) generates invalid css


this post was a mistake by myself. I assumed that obfuscation would cause the problem. As I learned now it has nothing to do with obfuscation but with minifying the css. We used yui-compressor which has a known bug when it comes to @media and ... So we just need to switch the tool for minifying the css.

Sorry for the mistake

Am Samstag, 25. März 2017 09:41:52 UTC+1 schrieb Hannes:
I compile my gwt project with gwt-style=OBF. Now I realize that this generates media queries where the space between "and" and "(" is missing. So out of 

@media screen and ( ... gets 
@media screen and(

As you can see the space between "and"  and "(" is missing.
According to W3C this not ok and also does not work (at least in chrome and firefox). 
You can easily test this in chrome by adding a @media query for example in chrome by adding a rule to the inspector style sheet as desribed here. You will see that adding the space between "and" and "(" changes everything! :-)

Do you have any idea how to generate working css and still use gwt code obfuscation?

Thanks in advance

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment