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 #1214: Sphinx 4 <pre> overflow #1220

Merged
merged 2 commits into from Sep 7, 2021
Merged

Conversation

nienn
Copy link
Contributor

@nienn nienn commented Aug 25, 2021

This adds a max-width to the Sphinx 4 dl.property to prevent the overflowing of the pre tag that was occurring when placed inside this dl.

This specific dl class is set to display:inline-block, which doesn't deal very well with the white-space:pre from the pre tag. Adding a max-width to the dl.property should fix it.

Altered CSS

html.writer-html4 .rst-content dl:not(.docutils) .property, 
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .property {
  display: inline-block;
  padding-right: 8px;
  max-width: 100%;
}

Fixes #1214

@nienn nienn requested a review from a team as a code owner August 25, 2021 15:42
@dp0s
Copy link

dp0s commented Aug 29, 2021

Thanks :)

@nienn
Copy link
Contributor Author

nienn commented Aug 30, 2021

Np. This will probably have to wait for the current release to move forward thought.

@agjohnson
Copy link
Collaborator

This looks like a good change to include in 1.0, our first release supporting Sphinx 4.

@agjohnson agjohnson added this to the 1.0 milestone Sep 7, 2021
Copy link
Collaborator

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

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

Easy enough! I don't think there is a test case for this in our docs either way, but didn't notice any significant changes with our test docs from this 👍

@agjohnson agjohnson merged commit acada32 into master Sep 7, 2021
@agjohnson agjohnson deleted the nienn/fix-sphinx-4-pre-overflow branch September 7, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML formatting issues after updating sphinx
3 participants