How can I change the background color of the tooltip ?
this does not work
this.getStyle().set(“background”, “white”);
How can I change the background color of the tooltip ?
this does not work
this.getStyle().set(“background”, “white”);
You can use the theme light:
https://github.com/vaadin-component-factory/tooltip/blob/master/tooltip-demo/src/main/java/com/vaadin/componentfactory/demo/TooltipView.java#L76
Or if you need a custom color you need to import your own Css:
@CssImport(value="./my-file.css", theme-for="vcf-tooltip")
And your css should contain:
[part='container']
{
background-color: white;
}
I didn’t try it but it should work.
thanks.
works fine with our own Css, but we had to remove the “dark”-theme
It looks like there is some element behind the tooltip that always has a White background, which prevents me from setting the background of the entire tooltip to “transparent”. Do you have any guidance for how to select the rest of the tooltip via CSS?
Edit: Actually it looks like this is just a problem with CSS priority. The following CSS did the trick, and I can adjust as necessary from here.
:host , [part='container']
{
background-color: transparent !important;
}