diff --git a/_ext/translation_graph.py b/_ext/translation_graph.py index 76c4a479..58be9326 100644 --- a/_ext/translation_graph.py +++ b/_ext/translation_graph.py @@ -143,12 +143,14 @@ def run(self): ) # Create figure fig = go.Figure(data=heatmap) + + # plotly only lets us use css variables for colors in some places, + # and plotly otherwise inlines a lot of CSS itself. + # so colors are partially specified here, and partially (forcefully) + # overridden in _static/pyos.css fig.update_layout( paper_bgcolor="rgba(0,0,0,0)", plot_bgcolor="rgba(0,0,0,0)", - hoverlabel_bgcolor="var(--bs-body-bg)", - hoverlabel_font_color="var(--bs-body-color)", - font_color="var(--bs-body-color)", margin=dict(l=40, r=40, t=40, b=40), xaxis_showgrid=False, xaxis_side="top", diff --git a/_static/pyos.css b/_static/pyos.css index f40cce43..229d7cf2 100644 --- a/_static/pyos.css +++ b/_static/pyos.css @@ -428,6 +428,11 @@ th { fill: var(--pst-color-text-base) !important; } + g.hovertext > path:first-child { + fill: var(--pst-color-background) !important; + stroke: var(--pst-color-border) !important; + } + @media (max-width: 540px) { g.heatmap-label > text { display: none;