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

Sticky menu height protection and topbar breakpoint #6632

Closed
wants to merge 2 commits into from

Conversation

vita10gy
Copy link

Add protection so a menu won't be sticky if it's taller than the screen (generally, once opened).

Otherwise you're never able to get to the end items.

I've also added the topbar breakpoint option (which seems like the most
likely one a person really means) and cleaned the function up to use the
existing small() medium(), and large() functions it was already half
using.

Addresses issue #6631

Add protection so a menu won't be sticky f it's taller than the screen.
(generally once opened).

Otherwise you're never able to get to the end items.

I've also added the topbar breakpoint option (which seems like the most
likely one a person really means) and cleaned the function up to use the
existing small() medium(), and large() functions it was already half
using.
@vita10gy
Copy link
Author

It would be a non backwards compatible change, but I think it aught to be considered for a future version that sticky_on take in arbitrary queries (small-up, medium-only, large), and work like the standard queries already do. Great pains now are taken to ensure small means "small only" medium means "medium only", etc, even though this is generally the opposite of what is meant.

Basically sticky_on:[foo,bar] should check
matchMedia(Foundation.media_queries['foo']) or
matchMedia(Foundation.media_queries['bar'])

@rafibomb rafibomb added this to the 5.5.3 milestone Sep 1, 2015
@zurbchris
Copy link
Contributor

At this time, we aren't adding any large features or changes that may affect current usability. We are, however, working hard on Foundation 6, and will keep this in mind. Thanks for contributing!

@zurbchris zurbchris closed this Sep 3, 2015
@vita10gy
Copy link
Author

I'd file this as more of a bug fix than a "feature". Currently a menu is made sticky even if it's taller than the current window, meaning you can't ever get to the bottom of the menu.

This check makes it so it only applies the sticky if a sticky would fit, otherwise it would scroll as a normal in place menu so you can get to the "missing" options.

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

Successfully merging this pull request may close these issues.

None yet

3 participants