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

Rework toc styles #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Rework toc styles #6

wants to merge 1 commit into from

Conversation

JayPanoz
Copy link
Contributor

@JayPanoz JayPanoz commented Apr 3, 2019

These should fix a bunch of usability issues for longer and more complex tocs:

  • added some margin at the bottom of the ol so that the last item in overflow is not cut off, and/or hidden by browsers’ url infobar
  • switched to margin for the indentation of nested lists as the previous width would be computed relative to their container (so 88% of 88% of 88% was 68% for h3 in the toc)
  • made the indentation slightly responsive
  • blockified toc list items as they inherited inline-block from global styles
  • added box-sizing for links and spans so that padding doesn’t add to the width – else they overflow their container

That should work fine with 4 levels (actually reworked the toc because of that), but extra levels after that… nesting is becoming a not-so-great solution imho, probably something else should be used instead – or extra levels be ignored entirely?

These should fix a bunch of usability issues for longer and more complex tocs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants