If you have a designer who produces a high-quality code layout, you should use it, but only if you know all the risks and compatibility issues and do not care or you have the opportunity to check your layouts.
Assuming all these things, I find this approach extremely effective ..
Just create your widgets from HTMLPanel and use divs as you want, only swap first class objects to present your layout when you need programmatic control
<g:HTMLPanel > <div class="normal style classes {obfuscated.style.class}"> <g:FlowPanel ui:field="programmaticPanel" stylePrimaryName="style"> <g:HTMLPanel> <p>CONTENT</p> </g:HTMLPanel> </g:FlowPanel> </div> </g:HTMLPanel >
Note that you can still use your obfuscation styles with vanilla divs / spans, etc. or mix and match!
Haveaguess
source share