Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 3 weeks ago
How to change SCSS dynamically?
I have a Panel and I want to change the background color of the top part ("My panel title" section in my attachment) dynamically? Depends on a user's action, I want to change its color. Is that possible? If so, are any any example code I can use as an example?
Thanks
Last updated on
Hey Andy,
You could add a style name to the panel depending on what action the user chose.
.v-panel.action-1 .v-panel-caption {
background-color/image: ...
}
.v-panel.action-2 .v-panel-caption {
background-color/image: ...
}
etc.
Last updated on
You cannot reply to this thread.