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

Improve: Responsive Horizontal-to-Vertical Menu #495

Closed
inexist3nce opened this issue May 24, 2015 · 4 comments
Closed

Improve: Responsive Horizontal-to-Vertical Menu #495

inexist3nce opened this issue May 24, 2015 · 4 comments
Labels

Comments

@inexist3nce
Copy link

@inexist3nce inexist3nce commented May 24, 2015

The responsive menu at http://purecss.io/layouts/tucked-menu-vertical/ does not adjust height as one would expect.

When viewing in a screen smaller than 768px, the "responsive" menu has a fixed height that could potentially cause issues with long menus (or in really small screens with wrapping text).

This can be fixed by replacing the hardcoded height: 14em; at line 69 with height: auto;.

image

@jamesalley
Copy link
Contributor

@jamesalley jamesalley commented May 26, 2015

Thanks for the report and suggestion. I'll re-examine this when I next release the pure-site.

It's possible that I started with auto but discovered a certain browser was having trouble unless I explicitly set the height, so keep browser vagaries in mind.

@jamesalley jamesalley added the bug label May 26, 2015
@qskousen
Copy link

@qskousen qskousen commented May 21, 2016

I recently found out this gets worse when you have more menu items - they get cut off after the 14em.

@redonkulus
Copy link
Contributor

@redonkulus redonkulus commented Dec 20, 2016

@inexist3nce @qskousen only problem with adding height:auto is that the transition animation does not work anymore, since you cannot transition to auto. This might be a case where the application either removes the animation and thus can have a flexible height. Or just manually calculates the height based on how many items are in it.

@MikeiLL
Copy link

@MikeiLL MikeiLL commented Aug 31, 2017

Wondering if this ties into my issue where child-items in the vertical version of the nav don't open on hover. Can be seen here in this CodePen.

Or is this expected behavior and I need to handle showing child items on my own in the vertical version of the menu?

The following code seems to solve my issue, as long as it overrides the default yui-pure-css styling:

.pure-menu-has-children {
  position: relative;
}

.pure-menu-children {
    left: 3em; // or a percentage, maybe
    top: 2em;
}

Also found the need to add text-align: left to the pure-menu-link since the vertical menu items are coming up at the full width of the viewport with text center-aligned.

Seems like I'm either doing something wrong, or the base case could be more intuitive.

@redonkulus redonkulus closed this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.