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

Do not break lines within :option: references #1259

Open
marxin opened this issue Dec 8, 2021 · 1 comment
Open

Do not break lines within :option: references #1259

marxin opened this issue Dec 8, 2021 · 1 comment
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@marxin
Copy link

marxin commented Dec 8, 2021

Please cherry-pick the upstream change made in sphinx-doc/sphinx#9929 that resolved sphinx-doc/sphinx#9909.

@marxin marxin added Bug A bug Needed: replication Bug replication is required labels Dec 8, 2021
@nienn
Copy link
Contributor

nienn commented Dec 8, 2021

Thank you for reporting this @marxin.

The problem with white-space: nowrap is that it will break the layout for long .literals.

Screenshot 2021-12-08 134610

Maybe we can assume that users will choose to use a block literals for these cases, or we could make the .literal inline-block elements instead. This options requires more testing to make sure nothing breaks and some tweaking to paddings and positionings to make sure the inline-block elements don't shift the line height.

What do you think @agjohnson?

I did some initial testing and the code bellow works without any line shifting. We'd just need to test it for possible edge cases.

Screenshot 2021-12-08 140618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
Development

No branches or pull requests

2 participants