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

Sidenav Bar + Scrolling on Small Windows #108

Open
michaelportal opened this issue Sep 16, 2015 · 5 comments
Open

Sidenav Bar + Scrolling on Small Windows #108

michaelportal opened this issue Sep 16, 2015 · 5 comments

Comments

@michaelportal
Copy link

I messaged you on twitter but I think this might be a better avenue (maybe?).

I am currently using and modifying your Hyde theme for Github Pages / Jekyll static sites. One problem that I keep running into is that if the window is too small the nav column on the left will not load properly: in a smaller window the menu navs will get cut off without the option to scroll down on the left (colored) column to see what is missing.

Is there any solution?

Thank you so much for a fantastic theme! - MP

screen shot 2015-09-16 at 6 20 04 pm

Here you can see how the page is expect to show up

screen shot 2015-09-16 at 6 20 10 pm

If someone has a smaller screen or smaller browser window then part of the text is cut off and you cant scroll. In this second image Hyde is cut off. Since I want to have my stuff pinned to the top of the column, it is usually my nav bar.

Hope that provides more context.

@ghost
Copy link

ghost commented Sep 20, 2015

#106 and #103 cover it.

Basically: remove the sidebar-sticky class from the sidebar.

@michaelportal
Copy link
Author

Removing sidebar-sticky does not remove the problem if the window pane is smaller than the content.

In reference to #103 I have tried the code provided but am not able to generate the right outcome.

Using the public repo from #106 I was able to locate the changes to the CSS he used to make his website scroll (visible here: http://faq.sealedabstract.com/). In my situation I had to change the min-width from "48em" to "48rem". (and of course adding overflow: scroll to the css and re-adding "sidebar-sticky" to the sidebar file). The code 106 used is here:

.sidebar {
text-align: center;
padding: 2rem 1rem;
color: rgba(255,255,255,.5);
background-color: #202020;
}
@media (min-width: 48rem) {
.sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 18rem;
text-align: left;
overflow: scroll;
}
}

Thanks for the help!!

@scottcwilson
Copy link

I have a large number of static pages that I want to show in the side nav. What I get when I use sidebar-sticky is the h1 in the sidebar getting cut off, and if I don't, the last few static pages in the nav getting cut off. Not sure how to fix this.

@muly
Copy link

muly commented Mar 21, 2017

I see the same issue with gophercloud website. The left sidebar menu is cut off when viewed on a low resolution monitor, and there is no way to scroll. Note: I'm not the owner of that website.

@julbinb
Copy link

julbinb commented Sep 24, 2022

What seems to have worked for me: add

height: 100%;
overflow-y: auto;

to #sidebar, .home #sidebar in the desktop view, in _layout.scss

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

No branches or pull requests

4 participants