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

Line space between items in toctree list too wide #1029

Closed
idnsunset opened this issue Dec 30, 2020 · 1 comment
Closed

Line space between items in toctree list too wide #1029

idnsunset opened this issue Dec 30, 2020 · 1 comment
Labels
Design Design or UX/UI related Good First Issue Good for new contributors Needed: design decision A core team decision is required
Milestone

Comments

@idnsunset
Copy link

Problem

Line space between items in toctree list is too wide. It seems that .rst-content .section ul li > ul overrides .rst-content .toctree-wrapper ul li ul producing the 12px bottom margin and .rst-content .section ul li>* produces 12px top margin.

I have to set both margin-top and margin-bottom to 0 on nested <ul> elements in .toctree-wrapper to fix this.

Error Logs/Results

sphinx-rtd-theme_toctree-line-space

Expected Results

2020-12-30-165016_209x106_scrot

Environment Info

  • Python Version: 3.9.1
  • Sphinx Version: 3.3.1
  • RTD Theme Version: 0.5.0
@stsewd stsewd added Bug A bug Design Design or UX/UI related Needed: design decision A core team decision is required and removed Bug A bug labels Jan 4, 2021
@Blendify Blendify added this to the 1.0 milestone Mar 23, 2021
@Blendify Blendify added the Good First Issue Good for new contributors label Apr 22, 2021
@Blendify Blendify modified the milestones: 1.0, 1.1 Jul 20, 2021
@nienn
Copy link
Contributor

nienn commented Jan 6, 2022

This got fixed in version 1.0 by the PR #1185 with the following code:

ol.simple li, ul.simple li
> *
margin-top: 0rem
margin-bottom: 0rem
ul, ol
margin-top: 0rem
margin-bottom: 0rem

Also, #1202 is related by intentionally adding the space back for nested lists on the .toctree-wrapper that are outside sections. But it doesn't affect the margins for the .simple lists that was fixed by the previous code.

I'm closing this issue for now as I think the two PR above should have solved the spacing issues on the toctree but feel free to reopen if that is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Design or UX/UI related Good First Issue Good for new contributors Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

4 participants