I use dialog to display information.
I would like to style content (nothing special just H1, H2, Paragraph) with css
I try to apply style to element, class, id
None works
I can only applay style directly to components:
H2 title = new H2(“title”);
title.setClassName(“uatitle”);
title.getElement().getStyle().set(“margin”, “0px”);
For the reference, you can add styles inside a dialog like this:
<dom-module id="my-dialog-styles" theme-for="vaadin-dialog-overlay">
<template>
<style>
/* Styles defined here are effective only inside a dialog */
h1 {
color: red;
}
</style>
</template>
</dom-module>
Note that it’s theme for vaadin-dialog-overlay, not vaadin-dialog.