Using GWT 2.1, I am trying to create a CSS file that contains many constants and common styles. I would like to use the ui: style tag to include it in the UiBinder template:
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' <ui:style field="css" src="constants.css" /> </ui:UiBinder>
I can easily use styles for elements:
<g:FlowPanel styleName="{css.panel}">...</g:FlowPanel>
But an attempt to use constants in another style block fails:
<ui:Style> .templateSpecificStyle { background-color: {css.royalBlue}; padding: 1em; } </ui:Style>
Oddly enough, I am not getting a compilation error. An intricate CSS class is created; however, the contents are empty. Is there a way to access these CSS constants in another style block? Is it possible to use the old ResourceBundle / CssResource template?
source share