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

Remove 6px horizontal padding in span.pre #134

Merged
merged 1 commit into from
Aug 2, 2021
Merged

Remove 6px horizontal padding in span.pre #134

merged 1 commit into from
Aug 2, 2021

Conversation

garymm
Copy link
Contributor

@garymm garymm commented Jul 30, 2021

Sphinx 3.x puts class signatures inside <span class="pre"> tags,
and this 6px horizontal padding was making it look bad.
Seen screenshots below.

I'm not sure why this padding was added in the first place, so it's possible this change makes something worse, but from a few minutes of poking around I don't see anything that looks bad.

Part of addressing general sphinx 3 support: #115.

Before:
conv3d-before

After:
conv3d-after

Sphinx 3.x puts class signatures inside `<span class="pre">` tags,
and this 6px horizontal padding was making it look bad.
Will add screenshots in comments.

Part of addressing general sphinx 3 support: #115.
@NicolasHug
Copy link
Member

Thanks a lot for the PR @garymm

Would it be possible to also take care of type annotations? We have a bunch in the domains libraries, and if pytorch ever introduces them, their docs will be broken as well. Taking the example from #115, this PR transforms

image

into

image

which unfortunately still looks broken

Copy link

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for fixing this!

@brianjo is there anything we need to do before merging a PR here?

@brianjo brianjo merged commit 114bdb6 into pytorch:master Aug 2, 2021
@NicolasHug
Copy link
Member

@albanD @brianjo just FYI, by merging this and keeping sphinx 3 in pytorch, you're taking the risk that the docs will look broken as soon as pytorch starts adding type annotations.

@brianjo would it be possible to move #115 forward to avoid such issues?

@mattip mattip mentioned this pull request Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants