Hi everyone.
Im try to create import(css) logical for my app, but not working:
parent{
import parent.css
children{
import children.css
subchildren{
import subchildren.css
}
}
}
My parent class:
@HtmlImport("styles/LeftMenu.html")//CSS
public class LeftMenu extends Div {
public LeftMenu() {
addClassName("LeftMenu"); //this style work for LeftMenu.class
Client client = new Client();
add(client.renderMenuItem());//Client
}
}
My children class:
@HtmlImport("styles/Client.html") //this styles not applied for Client.class (not working)
public class Client {
public static String APP_ICON = ClientResources.appIcon;
public Client() {
}
//Элемент основного меню
public Div renderMenuItem(){
Div menuItem = new Div();
menuItem.addClassName("MenuItem");
Image menuItemIcon = new Image(APP_ICON,"");
menuItemIcon.addClassName("menuItemIcon");
menuItem.add(menuItemIcon);
return menuItem;
}
}