How to control auto resize of html pages?

274 views
Skip to first unread message

Reza Roodsari

unread,
May 22, 2018, 5:54:33 PM5/22/18
to sphinx-users
I have a working html build on sphinx v1.1.3 and html pages automatically resize as I change the window size.
I upgraded to sphinx 1.7.4 and after make html the page display with fixed size with black background on the right. Changing the window size doesn't increase the width beyond a certain max, but shrinking it will shrink the size of the html page.

I have nothing fancy - looking at html source the only .css files included are classic.css, pygments.css, and html_style.css.
Can anyone suggest where to look next to solve the problem?
Thanks.

Carol Willing

unread,
Jun 2, 2018, 9:26:08 PM6/2/18
to sphinx-users
Perhaps try to completely uninstall sphinx and then reinstall it to see if the upgrade didn't get all of the source files.

Reza Roodsari

unread,
Jun 3, 2018, 4:15:13 AM6/3/18
to sphinx-users
Good idea - tried it on Ubuntu-16.04 -- clean install using pip:

$ pip install sphinx

$ sphinx-build --version
sphinx-build 1.7.5

$ pip install Markdown --upgrade

$ pip install sphinxcontrib-fulltoc

$ pip install docutils

$ pip install rst2pdf

Unfortunately same results. Text adjusts as I shrink the window size, and expands to a certain point as I increase the window width, but not beyond a certain point. There is a max size that we are rendering to. I just need to figure out what css setting controls that. I think this may be new behavior in new sphinx.

Anyone know what controls the auto adjustment of html page as window size changes?

jfbu

unread,
Jun 3, 2018, 6:03:01 AM6/3/18
to sphinx...@googlegroups.com
Le 03/06/2018 à 09:20, Reza Roodsari a écrit :
> Good idea - tried it on Ubuntu-16.04 -- clean install using pip:
>
> $ pip install sphinx
>
> $ sphinx-build --version
> sphinx-build 1.7.5
>
> $ pip install Markdown --upgrade
>
> $ pip install sphinxcontrib-fulltoc
>
> $ pip install docutils
>
> $ pip install rst2pdf
>
>
> Unfortunately same results. Text adjusts as I shrink the window size, and
> expands to a certain point as I increase the window width, but not beyond a
> certain point. There is a max size that we are rendering to. I just need to
> figure out what css setting controls that. I think this may be new behavior
> in new sphinx.
>
> Anyone know what controls the auto adjustment of html page as window size
> changes?
>
>

Hi, from


http://www.sphinx-doc.org/en/master/changes.html#release-1-7-0-released-feb-12-2018

#4246: Limit width of text body for all themes. Conifigurable via theme options body_min_width and body_max_width.

see

http://www.sphinx-doc.org/en/1./theming.html?highlight=body_min_width

basic – This is a basically unstyled layout used as the base for the other themes, and usable as the base for custom themes as well. The HTML contains all important elements like sidebar and relation bar. There are these options (which are inherited by the other themes):

nosidebar (true or false): Don’t include the sidebar. Defaults to False.
sidebarwidth (int or str): Width of the sidebar in pixels. This can be an int, which is interpreted as pixels or a valid CSS dimension string such as ‘70em’ or ‘50%’. Defaults to 230 pixels.
body_min_width (int or str): Minimal width of the document body. This can be an int, which is interpreted as pixels or a valid CSS dimension string such as ‘70em’ or ‘50%’. Use 0 if you don’t want a width limit. Defaults may depend on the theme (often 450px).
body_max_width (int or str): Maximal width of the document body. This can be an int, which is interpreted as pixels or a valid CSS dimension string such as ‘70em’ or ‘50%’. Use ‘none’ if you don’t want a width limit. Defaults may depend on the theme (often 800px).

hope it helps

Jean-François

jfbu

unread,
Jun 3, 2018, 6:12:20 AM6/3/18
to sphinx...@googlegroups.com
Le 03/06/2018 à 12:02, jfbu a écrit :
> Le 03/06/2018 à 09:20, Reza Roodsari a écrit :
>> Good idea - tried it on Ubuntu-16.04 -- clean install using pip:
>>
>> $ pip install sphinx
>>
>> $ sphinx-build --version
>> sphinx-build 1.7.5
>>
>> $ pip install Markdown --upgrade
>>
>> $ pip install sphinxcontrib-fulltoc
>>
>> $ pip install docutils
>>
>> $ pip install rst2pdf
>>
>>
>> Unfortunately same results. Text adjusts as I shrink the window size, and
>> expands to a certain point as I increase the window width, but not beyond a
>> certain point. There is a max size that we are rendering to. I just need to
>> figure out what css setting controls that. I think this may be new behavior
>> in new sphinx.
>>
>> Anyone know what controls the auto adjustment of html page as window size
>> changes?
>>
>>
>
> Hi, from
>
>
> http://www.sphinx-doc.org/en/master/changes.html#release-1-7-0-released-feb-12-2018
>
> #4246: Limit width of text body for all themes. Conifigurable via theme options body_min_width and body_max_width.
>
> see
>
> http://www.sphinx-doc.org/en/1./theming.html?highlight=body_min_width

typo I meant

http://www.sphinx-doc.org/en/1.7/theming.html?highlight=body_min_width

Reza Roodsari

unread,
Jun 4, 2018, 2:28:48 AM6/4/18
to sphinx-users
Fixed by adding "body_max_width": "none" to html_theme_options.
Thank you
Reply all
Reply to author
Forward
0 new messages