org-spec icon indicating copy to clipboard operation
org-spec copied to clipboard

Table of contents should have no vertical padding

Open AlexDaniel opened this issue 9 years ago • 2 comments

Actually, I am not sure about this one.

But try this:

  • Create a document with many headings
  • Change height of your window slightly, so that some part of the ToC is cut off (does not fit into the window vertically)
  • Scrollbar should appear
  • If you scroll down, can you see the last ToC item?

I can't, but I already have a lot of modifications to the style, so perhaps my bug report is not valid. Try it yourself.

I did this to fix it:

@media screen {
    #table-of-contents {
        padding: 0 0 0 2em; /* was 2em 0 2em 2em */
    }
    #table-of-contents h2 {
        margin-top: 1.5em; /* was 0 */
    }
}

AlexDaniel avatar Oct 03 '16 22:10 AlexDaniel

Hi @AlexDaniel - firstly thanks for all these submissions and MASSIVE apologies for only noticing them now (due to another new issue from today)... I haven't really used this project in a while, but adding a scrollbar for the TOC should just be this:

#table-of-contents {
    ...
    overflow-y: auto;
}

Will try to push an update ASAP

postspectacular avatar Aug 29 '18 23:08 postspectacular

@postspectacular thanks! Actually, I used it for a lot of projects… pretty much anything I did. :) Nowadays I'm perhaps more likely to use LaTeX where I used org-spec before, and I assume you do as well? If so, maybe the README can also suggest some alternatives (without deprecating org-spec though, because it is still awesome).

AlexDaniel avatar Aug 30 '18 05:08 AlexDaniel