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

Limit page width in all themes #4246

Closed
timhoffm opened this issue Nov 16, 2017 · 6 comments
Closed

Limit page width in all themes #4246

timhoffm opened this issue Nov 16, 2017 · 6 comments
Labels
html theme type:proposal a feature suggestion
Milestone

Comments

@timhoffm
Copy link
Contributor

timhoffm commented Nov 16, 2017

Problem

The following themes do not have a width limit on their pages:

  • nature
  • classic
  • traditional
  • pyramid
  • bizstyle

This can result in extremely long text lines on large screens, making text difficult to read.

Proposal

I propose to change the css of the above projects to limit the page width.

In case there are concerns that this changes the themes and breaks backward compatibility, one could at least add an option, so that users could set the width in the config.

@timhoffm
Copy link
Contributor Author

timhoffm commented Dec 9, 2017

If the basic idea is ok, I could write a pull request.

@tk0miya
Copy link
Member

tk0miya commented Dec 10, 2017

+1

@tk0miya tk0miya added html theme type:proposal a feature suggestion labels Dec 10, 2017
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 4, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
timhoffm added a commit to timhoffm/sphinx that referenced this issue Jan 6, 2018
tk0miya added a commit that referenced this issue Jan 15, 2018
#4246: Limit width of text body for all themes
@tk0miya
Copy link
Member

tk0miya commented Jan 15, 2018

Now #4246 is merged. It will be release as 1.7.
Thank you for your contribution!

@AndrewShepherd
Copy link

I understand why you did this, but is there a way that we can configure our setup (add to the conf.py file) so it reverts to max-width:none or max-width:fill-available?

@timhoffm
Copy link
Contributor Author

timhoffm commented Jan 10, 2019

It should be possible to set the body_max_width parameter to strings like initial, none or fill-available.

See also
https://www.sphinx-doc.org/en/master/usage/theming.html

@pradyunsg
Copy link
Contributor

pradyunsg commented Feb 4, 2020

Noting that the PR that fixes this was #4376 (not #4246 -- which is this issue itself -- as noted by @tk0miya).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html theme type:proposal a feature suggestion
Projects
None yet
Development

No branches or pull requests

4 participants