Navigation Menu

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

base theme: Wrap sidebar components in <div>s #9815

Merged
merged 1 commit into from Nov 11, 2021

Conversation

not-my-profile
Copy link
Contributor

Responsive themes inheriting from the base theme might want to display
the sidebar horizontally on narrower screens, which can be easily
achieved with flexbox. This however requires that the individual sidebar
components are wrapped in HTML elements so that flexbox can properly lay
them out.

Responsive themes inheriting from the base theme might want to display
the sidebar horizontally on narrower screens, which can be easily
achieved with flexbox. This however requires that the individual sidebar
components are wrapped in HTML elements so that flexbox can properly lay
them out.
@tk0miya tk0miya added this to the 4.4.0 milestone Nov 7, 2021
@tk0miya
Copy link
Member

tk0miya commented Nov 7, 2021

Looks good to me.

@ericholscher Before merging, I'd like to ask an advice from readthedocs team. Does this bring troubles to sphinx_rtd_theme? Please let me know your opinion.

@astrojuanlu
Copy link
Contributor

cc @nienn

@ericholscher
Copy link
Contributor

ericholscher commented Nov 8, 2021

@tk0miya Thanks for the ping. Juanlu already pinged one of our frontend folks, who can hopefully give some feedback soon. @agjohnson would be the other person who would be good to comment on it as well.

@nienn
Copy link

nienn commented Nov 8, 2021

I don't think we are including any of the modified templates in our theme. Instead we replace the entire layout.html with our custom one.

But I'd rather @agjohnson confirmed this.

For quick reference, in the basic theme the affected files are included here:

{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}

@agjohnson
Copy link
Contributor

sphinx_rtd_theme does technically inherit from basic:
https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/theme.conf#L2

However the theme also defines it's own local toc and bread crumbs for page relations, so is not reusing either of these files. If we were to reuse these files, we might have to alter our selectors lsightly, if any changes are required at all.

This change seems safe for sphinx_rtd_theme 👍 Thanks for the heads up @tk0miya !

@tk0miya
Copy link
Member

tk0miya commented Nov 11, 2021

Thank you for your comments and contributions. Now merging.

@tk0miya tk0miya merged commit 921cbe1 into sphinx-doc:4.x Nov 11, 2021
tk0miya added a commit that referenced this pull request Nov 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants