sphinx-tippy icon indicating copy to clipboard operation
sphinx-tippy copied to clipboard

Can we tweak the background color of the tooltips

Open pique-b opened this issue 1 year ago • 1 comments
trafficstars

I have been trying to adapt sphinx-hoverxref in my documnetation project, however not being able to test it in local system was quite limiting. Found the sphinx-tippy extension from a link to my question about the issue.

So far as basic tooltips are concerned, tippy seems to work. I was wondering if we can change the background color from the default (which comes out as black presently) to something lighter, preferably white. With a dark background some of the texts in the tip are obscured.

Check this image:

example_tip

Can you suggest a way around to do so in the present scheme of things?

If I may, there is another query:

The wikipedia tips are quite nice. However, I was wondering if we may do a similar thing with other sources, say an imdb page?

pique-b avatar Jan 12 '24 08:01 pique-b

You can do it by custom the css by yourself. see the guid given by the author in the important block

This package just add the javascript code from tippy.js, and the default theme provided by tippy.js is dark theme. Now the author not setting the theme in his/her invoking js code. So another solution is add a python readable config option named "theme", and pass it to the javascript code

ValMystletainn avatar Jan 19 '24 11:01 ValMystletainn