vaadin-app-layout icon indicating copy to clipboard operation
vaadin-app-layout copied to clipboard

Change AppToolBar Background Color

Open allenvpn312 opened this issue 2 years ago • 5 comments

Is there a way to change the AppToolBar background color? I tried appBar.getElement().getStyle().set("background", "var(--lumo-contrast-10pct") but it seems not to work. Thank you!

allenvpn312 avatar Nov 08 '22 05:11 allenvpn312

I also tried using a custom style via css and it the background is still show as default. [part~="app-bar"] { border: 1px solid var(--lumo-shade-10pct); background-color: black; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; }

allenvpn312 avatar Nov 08 '22 19:11 allenvpn312

@allenvpn312 Have you tried setting?

--app-layout-bar-background-color

appreciated avatar Nov 08 '22 19:11 appreciated

Thank you for the quick response. To be honest, I'm lost on how to do this. Could you provide a simple example? Also, I'm using the app layout with Vaadin 23 if that helps. Thank you

allenvpn312 avatar Nov 08 '22 19:11 allenvpn312

Untested but try the following:

html {
  --app-layout-bar-background-color: black;
}

appreciated avatar Nov 08 '22 19:11 appreciated

Ahhh...I understand now. Thank you

allenvpn312 avatar Nov 08 '22 19:11 allenvpn312