docfx
docfx copied to clipboard
Being able to scroll through "in this article" for larger/partial classes
Operation System: windows
DocFX Version Used: 2.51
Template used: default
Steps to Reproduce:
- Create a class with a large number of methods (in my case was an extension class)
- Generate the class with Docfx
Expected Behavior: "In this Article" section behaviour to scroll up to be able to cycle though the methods quickly from this panel.
Actual Behavior: Only shows the number of entries it can fit in before it runs out of space.
This is more of a question of is there a way to do this/a request if there is not than a issue.
In my case, I edited some CSS properties as follows:
.affix {
height: auto;
}
.sideaffix {
width: 250px;
overflow-x: hidden;
overflow-y: auto;
}
.affix > ul.level1 {
overflow: inherit;
}
I tested in 2.56.1.
@WonyoungChoi thanks a lot for this workaround, it works beautfifully! As a further improvement in my case, I found that I was able to avoid specifying the size of the sideaffix
if I let the text wrap around (which has the further advantage that you can actually read the complete method signatures).
.affix {
height: auto;
}
.sideaffix {
overflow-x: hidden;
overflow-y: auto;
}
.affix > ul.level1 {
overflow: inherit;
}
.affix ul > li.active > ul,
.affix ul > li.active > a:before,
.affix ul > li > a:hover:before {
display: block;
white-space: inherit;
}
Your solution worked great - thank you! (Of course, for a novice like me, I also needed https://dotnet.github.io/docfx/tutorial/walkthrough/advanced_walkthrough.html to know how to use these new properties - I just added them to the end of the default docfx.css.)
Is there any reason this vertical scrollbar in the sidebar is not included in the default/styles/docfx.css?