readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.8k stars 1.74k forks source link

Adding scrollbar into the sidebar #468

Open nadaa opened 7 years ago

nadaa commented 7 years ago

Hi, Is there any option to enable a scrollbar in the left sidebar?

Thanks

jessetan commented 7 years ago

I think this is intentionally hidden by commit 60eb0af7fba12fa77f550924dc2060ba05997a1c, see #206

Blendify commented 7 years ago

@agjohnson @ericholscher do you think it is reasonable that this could be an option?

ericholscher commented 7 years ago

What would the option do? I think currently we:

I'm not sure what we would change?

nadaa commented 7 years ago

I added html_sidebar={'overflow:auto'}, but nothing change!

LinuxMercedes commented 6 years ago

@ericholscher @jessetan The laptop I primarily use has no touchpad and no other convenient way to generate mouse scroll events. Would it be possible to make the sidebar scrollbar visible, or at least design the CSS so that it's relatively easy for me to override that? Otherwise I cannot easily scroll the sidebar.

jdillard commented 5 years ago

We just had a reader without a scroll wheel / touchpad run into the same issue. A workaround for those readers seems to be to hit tab and then use the up and down arrows.

paulmeems-waterwatchfoundation commented 5 years ago

We're running into the same issue. On the laptops of our users the sidebar has no scrollbars but not all of the content is visible when opening some pages: https://global-coffee-data-standard.readthedocs.io/en/latest/explanation.html#environmental-farm-characteristics

It would already be very helpfull if you could show how to override the setting in my custom css.

jdillard commented 5 years ago

The Ansible docs have a customized theme with a scrollbar in the nav, so I copied some styles and it seems to be be working for me. I added the following to a custom.css override file I have:

/* adds scrollbar to sidenav */
.wy-side-scroll {
  width: auto;
  overflow-y: auto;
}

I personally don't think it should be an option, as I know how painful it is to support all CSS options with future changes, and just be changed in the original theme styles. The reason being is also because OSX, and I would assume other operating systems, give the option to hide/show scroll bars in their General settings, so that option exists at a global level essentially:

screen shot 2019-02-28 at 8 59 39 am

You can can see the changes live here: https://docs.ansible.com/ansible/devel/installation_guide/intro_configuration.html and here: https://docs.netgate.com/pfsense/en/latest/

paulmeems-waterwatchfoundation commented 5 years ago

Thanks @jdillard your css is also working for me.