Search code examples
cssgwtuibinder

How to preserve css class name through GWT compilation?


How to preserve css style names used in UiBinder files (*.ui.xml) and prevent them to be obfuscated to something like this GEMOY02DD3B?


Solution

  • Use @external GWT specific CSS at-rule followed by list of class names to declare classes that shouldn't be obfuscated.

    Documented in javadoc of CssResource.

    E.g.

    <ui:style>
        @external floatingLeft;
    
        .floatingLeft {
            float: left;
        }
    </ui:style>