i use two divs inside a simple horizontal-layout to manage responsive layouting.
public class UserMenu extends MenuBar {
@Inject
private ResourceManagerBean bundle;
@Inject
private SessionPrincipalPrimitiveIntf sessionPrincipal;
@Inject
private SSOHandlerIntf ssoHandlerIntf;
@PostConstruct
private void init() {
SubMenu root = this.addItem(createProfileInformation(sessionPrincipal.getLoggedInUser())).getSubMenu();
createMenuContent(root);
this.setId("usermenu");
this.addClassNames("ms-auto", "me-m", "usermenu");
}
with createProfileInformation i let add a horizontalLayout which get added two divs
private HorizontalLayout createProfileInformation(UserDTO user) {
HorizontalLayout layout = new HorizontalLayout();
layout.add(createProfileInformationDesktop(user));
layout.add(createProfileInformationMobile(user));
layout.setId("loggeduser");
layout.addClassName("loggeduser");
return layout;
}
but the css-styles are not accepted :( The css is in a my theme.jar
resource/META-INF/resources/themes/mytheme/base.css
.loggeduserdesktop{
visibility: hidden;
display: none;
}
.loggedusermobile{
color: red;
}
later it will be solved with @media
so, why is vaadin not accepting the css declaration?

