简体   繁体   中英

How to apply complex styles using CSSResource in GWT

In my project I your CSSResource bundle to apply styles accros the project.

How do I apply more complex styles such as given in the example ?

I do not manage to get the child style applied using x.setStyleName(refToCss.MenuBar()) and addStyleName(refToCess.MenuItem()).

In my case the second (child) style MenuItem just seems to be ignored.

I just use this menubar as example here. What I want to achieve is having multiple components with multiple states. Eg .component1 .stateA, component2 .stateA .. where state A has different visual appearance for component1 and component2.

(Actually as CSS should work).

Thanks in advance, Wouter

In my case the second (child) style MenuItem just seems to be ignored.

为了忽略你应该使用

x.setStylePrimaryName(refToCss.MenuBar());

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM