2

I know that obfuscation can be turned off for ALL css resources (In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes?) or for ONE external class (using @external)

How can I turn off CSSResource obfuscation for only one type. I want to use some Twitter Bootstrap, and they use advanced attributed selectors from CSS3. The only way I can think to get these to work is disable CSS obfuscation.

Naturally, I could avoid using a CssResource, but I like the handy tab-completion and static analysis that it does.

Any ideas? This doesn't work:

<when-type-is class="my.org.CssResource">
    <set-configuration-property name="CssResource.style" value="pretty"/>
</when-type-is>
Community
  • 1
  • 1
logan
  • 3,416
  • 1
  • 33
  • 45

1 Answers1

4

I am answering my own question because it was hard to find:

By checking out the source-code, and cross comparing with the GWT wiki, I found:

/* @external also accepts tail-globs */
@external .myProject-*;
.myProject-text {}
.myProject-foo {}

So, if you want to let all the classes in a CSS resources in a file be external, use:

@external *;
logan
  • 3,416
  • 1
  • 33
  • 45