How do I style a MenuBar button?

For example I have:

button.addThemeVariants(ButtonVariant.LUMO_SMALL);
button.getStyle()
.set(“margin”, “2px”)
.set(“–lumo-button-size”, “25px”)
.set(“–lumo-font-size-s”, “12px”);

But I cannot find a way to replicate this with a MenuBar button. The reason I have a MenuBar rather than a button is that I want a popup ContextMenu to appear on clicking. I just can’t seem to figure any way to style the MenuBar or MenuItem buttons. Mainly I just want to make the button smaller. I’ve gone through all the styling, etc. but nothing seems to be applied to the MenuBar button…

Or even better it would be even better if it’s possible to setup a button so that the ContextMenu fires on a right left click rather than a right click.

I just found a partial solution for the context menu through the use of setOpenOnClick(). Not what I would expect to pick between right and left click but at least it’s there.

But that being said if anyone can offer help with styling a MenuBar button that would be appreciated. I need it for something else anyways. Thank you.

@fun-loving-coyote https://vaadin.com/docs/latest/components/menu-bar/styling

I’ve been looking at that page combined with https://vaadin.com/blog/simplified-theming-in-vaadin-24 but I can’t seem to make it work…

@fun-loving-coyote Are you using a CSS file?

Yes

Can you please share it?