From ac6935bc443016384935137a7b769f558cdfc7bd Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 22 Oct 2021 17:32:15 -0400 Subject: [PATCH] Fix selection of parameter names in HTML theme Parameters are written in HTML as (leaving out some internal classes): ``` nameTypeName ``` but in rendered form there's a colon between the name and type. This colon is inserted virtually using CSS, but since it doesn't exist, the browser thinks both sides are part of the same word. Styling the virtual text as inline block makes it be treated as a break, but also makes it apply vertical margins, so we need to set those to zero again. See https://github.com/matplotlib/matplotlib/issues/21432 --- sphinx/themes/basic/static/basic.css_t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 45815bac0a7..43e04bd3411 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -731,8 +731,9 @@ dl.glossary dt { .classifier:before { font-style: normal; - margin: 0.5em; + margin: 0 0.5em; content: ":"; + display: inline-block; } abbr, acronym {