I've the same problem but i want to use the CssResource approach.
I just want to set my custom CSS to a single TabBar/TabPanel instance, leaving the default gwt Theme on other all TabBar/Panel.
That's what i've done:
- found the original TabBar and TabPanel Gwt css file
- created a new css file, pasted the original css, edited class names by renaming all classe from .gwt-* to .myProject* and changed the attribute values
- created a CssResource with the two main selector methods: .myProjectTabBar and .myProjectTabPanel
- set my custom style to widget with:
mainTabPanel.getTabBar().addStyleName(Styles.INSTANCE.tabBarPanel().myProjectTabBar());
mainTabPanel.addStyleName(Styles.INSTANCE.tabBarPanel().myProjectTabPanel());
- added @external .myProject*; to my css file referenced by CssResource @Source annotation due to avoid (un)obfuscation exception
It works only for base-style like .myProjectTabBar, but not for substyles like .myProjectTabBar .myProjectTabBarItem {...}: the style still remains the Gwt default.
What i have to do for make my custom TabBar/Panel style works?
I know that i can add the css in gwt.xml file (leaving original style names on it) but this means that ALL TabBar/Panel widget will be styled, isn't true?
Thanks in advance
M.