Skip to content

Commit

Permalink
Fix selection of parameter names in HTML theme
Browse files Browse the repository at this point in the history
Parameters are written in HTML as (leaving out some internal classes):
```
<strong>name</strong><span class="classifier"><a><code><span>TypeName</span></code></a></span>
```
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 matplotlib/matplotlib#21432
  • Loading branch information
QuLogic committed Oct 22, 2021
1 parent cf96c93 commit ac6935b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sphinx/themes/basic/static/basic.css_t
Expand Up @@ -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 {
Expand Down

0 comments on commit ac6935b

Please sign in to comment.