Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Oct 22, 2021

Feature or Bugfix

  • Bugfix

Purpose

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 as well.

Relates

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
@tk0miya
Copy link
Member

tk0miya commented Oct 23, 2021

Thanks!

@QuLogic QuLogic deleted the fix-parameter-breaks branch October 23, 2021 03:55
tk0miya added a commit that referenced this pull request Oct 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants