Description
Hi! We just moved the Hypothesis documentation from sphinx-hoverxref
to the Link Preview addon. After doing so, I noticed that some of the tooltips display poorly:

https://hypothesis.readthedocs.io/en/latest/index.html
Where the link is inside an h2
, and the data-linkpreview-href
tooltip div is placed inside of that containing h2
element, meaning the entire tooltip content inherits the h2's font size / font weight / etc styles.
I checked other preview links inside headers, like the @given
link in this header, but those appended the tooltip to a root readthedocs-linkpreviews
element and display fine, since they don't inherit the h2
styles.
I'm not sure what is causing the behavior difference here, but I'm hoping you guys have some idea!
A confounding factor is that on the page where the tooltip div displays poorly, we have some custom css (source). I tried disabling these styles locally in devtools, to no visible effect, but perhaps their mere presence changes the build process for readthedocs somehow?
Hypothesis issue: HypothesisWorks/hypothesis#4347