Reputation: 2805
I'm having some trouble understanding Vaadin 10 theming: I've read all documentation on site but I can't solve my problem.
For example: if I start a plain Vaadin 8 application from scratch, when I stop the server I get a nice notification from disconnection:
But with a new Vaadin 10 starter (project base), i get this ugly notification
Both application are standard without any edit from Vaadin starters. I've tried playing with shared-styles.html but without success.
My questions, all vaadin 10 related:
Thanks
Upvotes: 1
Views: 1654
Reputation: 1479
@Theme(value = Lumo.class, variant = Lumo.DARK)
.html{--lumo-base-color: aliceblue;}
.Example use of the @Theme
annotation on the usual MainView
class:
@Route ( "" )
@Theme ( value = Lumo.class, variant = Lumo.DARK ) // ⬅ Add annotation
public class MainView extends VerticalLayout { … }
And here's how you can customize the disconnection notification:
<custom-style>
<style>
html {
--lumo-base-color: aliceblue;
}
.v-reconnect-dialog {
visibility: visible;
border: 1px solid lightslategray;
background-color: slategray;
color: lightgray;
box-shadow: 0.2em 0.2em 0.2em rgba(0, 0, 0, .4);
border-radius: 4px;
}
.custom {
color: lightskyblue;
}
</style>
</custom-style>
Upvotes: 8