python / python-docs-theme

Sphinx theme for Python documentation
Other
76 stars 59 forks source link

Don't let long code literals extend beyond the right side of the screen #139

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

Fixes https://github.com/python/python-docs-theme/issues/129.

With mobile, compare:

Before After
pradyunsg commented 1 year ago

In Furo, I went ahead and set break-word on the entire content container in https://github.com/pradyunsg/furo/commit/c8b51d09af3dcaac3046f7e761119e9d1b7c9e37

That makes it so that no regular text/markup, including really long one-word titles don't trigger a rewrap by default, would have an overflow beyond that element.

Do you think it's worth adopting a similar model here?

hugovk commented 1 year ago

Yes, that sounds better, would you like to update this PR or create a new one?

hugovk commented 1 year ago

Updated, how does this look?