Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change AppToolBar Background Color #468

Open
allenvpn312 opened this issue Nov 8, 2022 · 5 comments
Open

Change AppToolBar Background Color #468

allenvpn312 opened this issue Nov 8, 2022 · 5 comments
Labels

Comments

@allenvpn312
Copy link

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
Copy link
Author

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; }

@appreciated
Copy link
Owner

@allenvpn312 Have you tried setting?

--app-layout-bar-background-color

@allenvpn312
Copy link
Author

allenvpn312 commented Nov 8, 2022

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

@appreciated
Copy link
Owner

Untested but try the following:

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

@allenvpn312
Copy link
Author

Ahhh...I understand now. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants