I'm trying to figure out how to not apply a blanket style for all of one element using @CssImport. I've searched through the Vaadin docs to no avail.
Currently I'm rendering a MainMenuBar component and a SecondaryMenuBar component below it. I would like for each menu bar to have its own style. In Vaadin 14 I'm not able to attach a class directly on to the MenuItems so I have to target the menu bar buttons in the shadow dom using the @CssImport annotation like so:
@CssImport(value="styles/main-menu-bar.css", themeFor="vaadin-menu-bar-button")
Since I want to do the exact same thing for my SecondaryMenuBar I've add the same themeFor:
@CssImport(value="styles/secondary-menu-bar.css", themeFor="vaadin-menu-bar-button")
As you can imagine, this results in identical styling for both menu bars.
I'm not sure how else to target the menu bar buttons without styling ALL buttons.
Any help would be appreciated.