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

Toggling current ("on") item in sidebar changes height #459

Closed
jessetan opened this issue Sep 11, 2017 · 0 comments
Closed

Toggling current ("on") item in sidebar changes height #459

jessetan opened this issue Sep 11, 2017 · 0 comments
Labels
Bug A bug

Comments

@jessetan
Copy link
Contributor

Issue

When a toctree item is "current" in the sidebar, the <a> element is bold and has an extra border-top and border-bottom of 1 px. This causes the containing <li class="toctree-l#"> to grow in height by 2 px.
Example:
menuitem-border

Effect

Every time an item is clicked in the toctree, the item itself and the items below will change vertical position slightly.

Cause

_theme_layout.sass:81-82:

    border-bottom: solid 1px darken($menu-vertical-background-color, 20%)
    border-top: solid 1px darken($menu-vertical-background-color, 20%)

My guess is that these styles were intended only to apply to the first li.current > a (since the comment hints at this and there are overrides below), but only li.toctree-l4 > a has settings for border-top: none and border-bottom: none

Suggested fix

Add border-top: none and border-bottom: none for li.toctree-l#.current > a (with # 1--4)
OR
Set a fixed height for toctree <li> elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

2 participants