Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

About-menu shows vertical scrollbar with 5 or more contact link items #14

Closed
teelahti opened this issue Mar 3, 2014 · 7 comments · May be fixed by #15
Closed

About-menu shows vertical scrollbar with 5 or more contact link items #14

teelahti opened this issue Mar 3, 2014 · 7 comments · May be fixed by #15
Assignees

Comments

@teelahti
Copy link
Contributor

teelahti commented Mar 3, 2014

When there are 4 or less items in the about-menu it works flawlessly. If there are 5 or more, it shows a vertical scrollbar. This scrollbar was not visible on January 15th of 2014 version; one of the commits since then has changed the menu height. Reason for the current behavior is at main.css

@media only screen and (min-width: 48em) {
    .dl-menuwrapper .dl-menu {
        max-height: 650px;

image

Tested and reproducible with Chrome 35, IE 11, and FF 28.

teelahti added a commit to teelahti/teelahti.fi that referenced this issue Mar 3, 2014
Visible when there are 5 or more items on the about-menu. Fixes fixes
mmistakes#14
teelahti added a commit to teelahti/teelahti.fi that referenced this issue Mar 3, 2014
teelahti added a commit to teelahti/teelahti.fi that referenced this issue Mar 3, 2014
@mmistakes
Copy link
Owner

@teelahti I'm still playing around with the menu to get it just right on all devices. On tablets in landscape orientation and other small devices, when the menu was too tall it fell outside of the viewport, and since the menu is fixed position it was impossible to get at those links.

Trying to make it so the scrollbar triggers only when the menu falls outside of view. Check the animated gif below to see what I'm trying to avoid.

mm-nav-scroll

@teelahti
Copy link
Contributor Author

teelahti commented Mar 3, 2014

True, that is not desirable either. What if you position avatar image and name+description side by side on tablet resolutions? That would still leave mobile devices broken, though.

@mmistakes
Copy link
Owner

I think I have it worked out I just haven't had time to update the .less
and .css

On Mon, Mar 3, 2014 at 3:46 PM, Tero Teelahti [email protected]:

True, that is not desirable either. What if you position avatar image and
name+description side by side on tablet resolutions? That would still leave
mobile devices broken, though.

Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-36557520
.

@mmistakes mmistakes added the bug label Jun 11, 2014
@djechlin
Copy link

bump... since I'm working on this right now. Problem is the scrollbar won't scroll to the later elements. I'm not sure what's limiting the height or preventing the overflow. The scrollbar does appear and scroll a tiny bit though.

@mmistakes
Copy link
Owner

mmistakes commented Feb 16, 2015

@djechlin The real problem with the nav is the fixed positioning and people trying to make the menu deeper than it was originally intended to be. If you want to solve the problem the easy way and don't care about the nav being in view all the time, you can change .dl-menuwrapper { position: fixed; } to position: absolute;.

Then you can remove the max-height declarations from .dl-menu-wrapper .dl-menu and call it a day giving you something that resembles this:

hpstr-nav

Otherwise you can play around with the max-height values until you get one that works for you. I designed the theme to support popular window sizes. In my use cases none of them fell below 600px high. If you have a short window size then the menu will fall outside of the viewport which explains why you some of the list items are unscrollable.

If you want to get fancy you can use media queries that filter on height in addition to width to cover your bases.

@mmistakes
Copy link
Owner

mmistakes commented Jun 27, 2016

Possible fix.

Add this to .dl-menuwrapper .dl-menu

.dl-menu-wrapper .dl-menu {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 80%;
}

and remove max-height: 600px and 650px.

Which should show only scrollbars when content extends beyond the container's height.

nav-scroll

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants