Lara
Lara

Reputation: 2236

GWT, there is a way to ignore the CSS ID's generated when the code is compiled?

I'm using GWT in a new project that I'm working on and I'm facing a problem. Some of the CSS rules were defined into the XML file and not into a CSS file.

The problem is that when GWT compiles the code, my name classes defined into my XML file are changed to a new random ID.

Stuffs like GKA-VPPBPE or GKA-VPPBLE

Is there is a way to keep the original name instead of the generated ones?

Upvotes: 1

Views: 127

Answers (1)

Christian Kuetbach
Christian Kuetbach

Reputation: 16060

The generation of obfuscated css classnames is a feature.

GWT has enabled CSS obfuscation activated by default. This will help reduce the download size and also reduce collision of css-classnames.

You can disable this in general:

<set-configuration-property name="CssResource.style" value="pretty"/>

Or for some classes only:

@external .myClassName

Look here for some more information https://vcfvct.wordpress.com/2013/10/04/disable-obfuscation-in-gwt-css-resources/

Upvotes: 4

Related Questions