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
Invisible mobile top navigation bar #1285
Comments
Hi @cjmayo, thanks for reporting this. I believe that, at first, this was not the intended use for this option. It is the one suggested by the docs thought, so we need to consider either changing the docs or the implementation. A quick fix you can implement is to add a custom CSS file to your docs. This will allow you to target the bar Additional notesCurrent documentationFrom the first link it's suggested that Current code implementationThe only thing this option actually does is changing the background color to the
sphinx_rtd_theme/sphinx_rtd_theme/layout.html Line 133 in d64dadf
sphinx_rtd_theme/sphinx_rtd_theme/layout.html Line 195 in d64dadf
Proposed solutionsOption A) The code should make a check on color contrast, and alter the color accordingly for child elements of both the affected elements. Option B) The docs should be altered to highlight the use of darker colors (by default) and to inform on further possible actions for advanced customization. change: to: in: https://github.com/readthedocs/sphinx_rtd_theme/blame/master/docs/configuring.rst#L23 change:
to: Add information about targeting additional selectors that might require custom adjustments with a custom CSS file. in: https://github.com/readthedocs/sphinx_rtd_theme/blame/master/docs/configuring.rst#L169-L175 |
Problem
With
style_nav_header_background
set to white (as the example in https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#theme-options) when the browser is resized to mobile proportions the top navigation bar is invisible (all white).2026bb6 from #1132 set background to theme_style_nav_header_background if it is set. But the
.wy-nav-top a color
is hard-coded to #fff (white) in theme.css.Looks like this part:
And
.wy-nav-top color
for the hamburger too.Reproducible Project
Create a project with sphinx-quickstart
Edit conf.py:
make html
Open generated index.html and reduce page width until layout changes to mobile style.
Environment Info
The text was updated successfully, but these errors were encountered: