this is a question that has haunted me for quite a while now. How can I style the overlays that appear on Vaadin UI components that show their “description” text (a.k.a. tooltip) or component errors (I’m not talking about the error indicator icon, but about the overlay that appears when you hover over it with your mouse).
There actually is a chapter in the book of vaadin about tooltips (see here:
https://vaadin.com/book/-/page/components.features.html ), unfortunately it does not mention the corresponding CSS selectors. A small example snippet of CSS that shows how to style the background color of the overlay (one for tooltips, one for errors) would be very helpful! I guess this would only be 2 or 3 lines of code, but without knowing the name of the selector, this is difficult.
Thank you,
Martin
EDIT:
I’ve found the following CSS rules in the “Runo” theme “common.css” file:
This stuff certainly does look related. I’ve added it to my style sheet, however to no avail - my tooltips are still completely unstyled, they use Times New Roman 12p, without any background…
that’s good to know that I’m using the right selector. One of my teammates usually handles the CSS stuff but he’s currently on vacation so I thought that I might try it myself for once (CSS newbie here). To my knowledge, we are using a modified version of the theme provided by the Vaadin Dashboard Demo (
http://demo.vaadin.com/dashboard/ ). I tried to copy-paste the CSS I’ve posted above into our “common.scss” file, but it didn’t change anything. Whatever style I choose in the file, it is completely ignored by my web browser.
I also used the “file search” feature of Eclipse to run a project-wide search for “.v-tooltip”, hoping to find another rule that overrides my CSS styles, but I couldn’t find anything of significance. I used firebug and Chrome’s “inspect this element” feature (by now I’ve figured out where to look for tooltips in the HTML DOM tree generated by vaadin, its located at the very end), but everything it tells me is that the CSS styling for the tooltip originates from an “inline” definition (which is rather strange, imho it should come from the scss file).
I’m starting to remember why I felt so utterly frustrated when I tried to use CSS last time…
OH-MY-GOD that did it!! Thank you very much I already started to doubt my mental sanity you know xD
Do you have any idea why it works in the main file? Does that mean that some of our *.scss files are not linked properly? As I said earlier, I’m usually not responsible for those things.