Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selection of parameter names in HTML theme #9763

Merged
merged 1 commit into from Oct 23, 2021

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.

None yet

2 participants